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 |
|---|---|---|---|
| String | false | the bundle id |
| String | true | the friendly name the bundle will be named |
| boolean | false | whether to check the user authentication along with the ticket |
| String | true | the url of the request |
| String | true | http scheme |
| 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 |
|---|---|---|---|
| String | false | the bundle type |
| String | false | the bundle global id |
| String | false | the bundle version |
| String | true | the friendly name the bundle will be named |
| boolean | false | whether to check the user authentication along with the ticket |
| String | true | http scheme |
| String | true | the url of the request |
| 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 |
|---|---|---|---|
| String | false | the bundle id |
| boolean | false | whether to check the user authentication along with the ticket |
| String | true | the url of the request |
| String | true | http scheme |
| 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 |
|---|---|---|---|
| String | false | the bundle id |
| String | true | the locale, used to determinate the icon suitable for such locale. If it is null, the default locale is used |
| boolean | false | whether to check the user authentication along with the ticket |
| String | true | the url of the request |
| String | true | http scheme |
| 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 |
|---|---|---|---|
| String | false | the bundle id |
| String | true | the locale, used to determinate the preview suitable for such locale. If it is null, the default locale is used |
| boolean | false | whether to check the user authentication along with the ticket |
| String | true | the url of the request |
| String | true | http scheme |
| 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 |
|---|---|---|---|
| String | false | the bundle id |
| String | false | the resource name |
| boolean | false | whether to check the user authentication along with the ticket |
| String | true | the url of the request |
| String | true | http scheme |
| String | true | the server hostname |