Overview

The download URL generation can be done by the registered OSGi service com.prosyst.mprm.backend.download.DownloadURLGenerator. It has interface for getting the download URL of bundles, descriptors, icons, previews and resources taking into account the current RM configuration. For information about the Download Server configurations check here.

Using the Download URL Generator Service

Below an example is provided for getting the Download URL Generator Service:

import com.prosyst.mprm.backend.download.DownloadURLGenerator;
...
ServiceReference srvRef = context.getServiceReference(DownloadURLGenerator.class.getName());
if (srvRef != null) {
DownloadURLGenerator generator = (DownloadURLGenerator)context.getService(srvRef);
}
...

Download URL Generation


The Download Server JavaDoc is available here

The com.prosyst.mprm.backend.download.DownloadURLGenerator service has the following methods:

Get Bundle Download URL By ID

Generates a download URL. The bundle with the given id can be downloaded from method name: getBundleDownloadURLById
Parameters

Name

Type

Option

Description

bundleId

String

false

the bundle id

bundleFriendlyName

String

true

the friendly name the bundle will be named

checkTicketOnly

boolean

false

whether to check the user authentication along with the ticket

requesterURL

String

true

the url of the request

scheme

String

true

http scheme

serverHost

String

true

the server hostname

Get Bundle Download URL By Type, Global ID and Version

Generates a download URL. The bundle with the given concrete type, global id and version can be downloaded from method name: getBundleDownloadURL
Parameters

Name

Type

Option

Description

concreteType

String

false

the bundle type

globalId

String

false

the bundle global id

version

String

false

the bundle version

bundleFriendlyName

String

true

the friendly name the bundle will be named

checkTicketOnly

boolean

false

whether to check the user authentication along with the ticket

scheme

String

true

http scheme

requesterURL

String

true

the url of the request

serverHost

String

true

the server hostname

Get Descriptor Download URL

Generates a download URL. The descriptor of the bundle with the given id can be downloaded from method name: getDescriptorDownloadURL
Parameters

Name

Type

Option

Description

bundleId

String

false

the bundle id

checkTicketOnly

boolean

false

whether to check the user authentication along with the ticket

requesterURL

String

true

the url of the request

scheme

String

true

http scheme

serverHost

String

true

the server hostname

Get Icon Download URL

Generates a download URL. The icon of the bundle with the given id can be downloaded from method name: getIconDownloadURL
Parameters

Name

Type

Option

Description

bundleId

String

false

the bundle id

localeInfo

String

true

the locale, used to determinate the icon suitable for such locale. If it is null, the default locale is used

checkTicketOnly

boolean

false

whether to check the user authentication along with the ticket

requesterURL

String

true

the url of the request

scheme

String

true

http scheme

serverHost

String

true

the server hostname

PGet Preview Download URL

Generates a download URL. The preview of the bundle with the given id can be downloaded from method name: getPreviewDownloadURL
Parameters

Name

Type

Option

Description

bundleId

String

false

the bundle id

localeInfo

String

true

the locale, used to determinate the preview suitable for such locale. If it is null, the default locale is used

checkTicketOnly

boolean

false

whether to check the user authentication along with the ticket

requesterURL

String

true

the url of the request

scheme

String

true

http scheme

serverHost

String

true

the server hostname

Get Resource Download URL

Generates a download URL. The resource of the bundle with the given id can be downloaded from method name: getResourceDownloadURL
Parameters

Name

Type

Option

Description

bundleId

String

false

the bundle id

resourceName

String

false

the resource name

checkTicketOnly

boolean

false

whether to check the user authentication along with the ticket

requesterURL

String

true

the url of the request

scheme

String

true

http scheme

serverHost

String

true

the server hostname