API plugin - RapturePlatform/Rapture GitHub Wiki
The plugin API is used to manipulate information about stored plugins in the system. A plugin is a set of scripts, type and data definitions.
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
List<PluginConfig> retVal = pluginApi.getInstalledPlugins();retVal = baseAPI.doPlugin_GetInstalledPlugins();Entitlement: /admin/main
Lists plugins in the system.
This function takes no parameters.
| Type | Description |
|---|---|
| List |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
PluginManifest retVal = pluginApi.getPluginManifest(manifestUri);retVal = baseAPI.doPlugin_GetPluginManifest(manifestUri);Entitlement: /admin/main
Retrieves the manifest for a plugin.
| Parameter | Type | Description |
|---|---|---|
| manifestUri | String |
| Type | Description |
|---|---|
| PluginManifest |
This is a more detailed variant of PluginConfig that details the complete contents of a version of a plugin instance.
| Field | Type |
|---|---|
| contents | List(PluginManifestItem) |
| depends | Map(String, PluginVersion) |
| description | String |
| plugin | String |
| version | PluginVersion |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.recordPlugin(plugin);retVal = baseAPI.doPlugin_RecordPlugin(plugin);Entitlement: /admin/main
Retrieves the manifest for a plugin.
| Parameter | Type | Description |
|---|---|---|
| plugin | PluginConfig |
| Type | Description |
|---|---|
| void |
Holds config information for the main object used by the Plugin API.
| Field | Type |
|---|---|
| depends | Map(String, PluginVersion) |
| description | String |
| plugin | String |
| version | PluginVersion |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.installPlugin(manifest, payload);retVal = baseAPI.doPlugin_InstallPlugin(manifest, payload);Entitlement: /admin/main
Installs the plugin and updates the registry.
| Parameter | Type | Description |
|---|---|---|
| manifest | PluginManifest | |
| payload | Map<String,PluginTransportItem> |
| Type | Description |
|---|---|
| void |
This is a more detailed variant of PluginConfig that details the complete contents of a version of a plugin instance.
| Field | Type |
|---|---|
| contents | List(PluginManifestItem) |
| depends | Map(String, PluginVersion) |
| description | String |
| plugin | String |
| version | PluginVersion |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.installPluginItem(pluginName, item);retVal = baseAPI.doPlugin_InstallPluginItem(pluginName, item);Entitlement: /admin/main
Installs a single item from a plugin to allow clients to operate in a low-memory environment
| Parameter | Type | Description |
|---|---|---|
| pluginName | String | |
| item | PluginTransportItem |
| Type | Description |
|---|---|
| void |
The PluginTransportItem is an internal class used by the PluginInstaller. It carries the encoded form of a Rapture object between the PluginInstaller and the Rapture server.
| Field | Type |
|---|---|
| uri | String |
| content | ByteArray |
| hash | String |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.uninstallPlugin(name);retVal = baseAPI.doPlugin_UninstallPlugin(name);Entitlement: /admin/main
Removes a plugin.
| Parameter | Type | Description |
|---|---|---|
| name | String |
| Type | Description |
|---|---|
| void |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.uninstallPluginItem(item);retVal = baseAPI.doPlugin_UninstallPluginItem(item);Entitlement: /admin/main
Removes an item from a plugin.
| Parameter | Type | Description |
|---|---|---|
| item | PluginTransportItem |
| Type | Description |
|---|---|
| void |
The PluginTransportItem is an internal class used by the PluginInstaller. It carries the encoded form of a Rapture object between the PluginInstaller and the Rapture server.
| Field | Type |
|---|---|
| uri | String |
| content | ByteArray |
| hash | String |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.deletePluginManifest(manifestUri);retVal = baseAPI.doPlugin_DeletePluginManifest(manifestUri);Entitlement: /admin/main
Removes plugin Manifest but does not uninstall any referenced items.
| Parameter | Type | Description |
|---|---|---|
| manifestUri | String |
| Type | Description |
|---|---|
| void |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
PluginTransportItem retVal = pluginApi.getPluginItem(uri);retVal = baseAPI.doPlugin_GetPluginItem(uri);Entitlement: /admin/main
Gets the encoding for a Rapture object given its URI.
| Parameter | Type | Description |
|---|---|---|
| uri | String |
| Type | Description |
|---|---|
| PluginTransportItem |
The PluginTransportItem is an internal class used by the PluginInstaller. It carries the encoded form of a Rapture object between the PluginInstaller and the Rapture server.
| Field | Type |
|---|---|
| uri | String |
| content | ByteArray |
| hash | String |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
Map<String,String> retVal = pluginApi.verifyPlugin(plugin);retVal = baseAPI.doPlugin_VerifyPlugin(plugin);Entitlement: /admin/main
Verifies that the contents of a plugin match the hashes in the manifest.
| Parameter | Type | Description |
|---|---|---|
| plugin | String |
| Type | Description |
|---|---|
| Map<String,String> |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.createManifest(pluginName);retVal = baseAPI.doPlugin_CreateManifest(pluginName);Entitlement: /admin/main
create an empty manifest on the server with version 0.0.0
| Parameter | Type | Description |
|---|---|---|
| pluginName | String |
| Type | Description |
|---|---|
| void |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.addManifestItem(pluginName, uri);retVal = baseAPI.doPlugin_AddManifestItem(pluginName, uri);Entitlement: /admin/main
add an object on the server to a plugin manifest on the server
| Parameter | Type | Description |
|---|---|---|
| pluginName | String | |
| uri | String |
| Type | Description |
|---|---|
| void |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.addManifestDataFolder(pluginName, uri);retVal = baseAPI.doPlugin_AddManifestDataFolder(pluginName, uri);Entitlement: /admin/main
add uris within the specified docpath root. If no type is specifed in the uri, use all four of doc, blob, series, and sheet. Example1: //myProject/myfolder adds all four types. Example2: blob://myproject/myfolder adds only blobs
| Parameter | Type | Description |
|---|---|---|
| pluginName | String | |
| uri | String |
| Type | Description |
|---|---|
| void |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.removeManifestDataFolder(pluginName, uri);retVal = baseAPI.doPlugin_RemoveManifestDataFolder(pluginName, uri);Entitlement: /admin/main
remove uris within the specified path. If no type is specifed in the uri, use all four of doc, blob, series, and sheet.
| Parameter | Type | Description |
|---|---|---|
| pluginName | String | |
| uri | String |
| Type | Description |
|---|---|
| void |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.setManifestVersion(pluginName, version);retVal = baseAPI.doPlugin_SetManifestVersion(pluginName, version);Entitlement: /admin/main
refresh the MD5 checksums in the manifest and set the version for a manifest on the server
| Parameter | Type | Description |
|---|---|---|
| pluginName | String | |
| version | String |
| Type | Description |
|---|---|
| void |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
void retVal = pluginApi.removeItemFromManifest(pluginName, uri);retVal = baseAPI.doPlugin_RemoveItemFromManifest(pluginName, uri);Entitlement: /admin/main
remove an item from the manifest of a plugin on the server
| Parameter | Type | Description |
|---|---|---|
| pluginName | String | |
| uri | String |
| Type | Description |
|---|---|
| void |
HttpPluginApi pluginApi = new HttpPluginApi(loginApi);
String retVal = pluginApi.exportPlugin(pluginName, path);retVal = baseAPI.doPlugin_ExportPlugin(pluginName, path);Entitlement: /admin/main
Export a plugin as a single blob. We pass in a parent path; the blob will be generated somewhere under that path, in a non-predictable location. The location is returned.
| Parameter | Type | Description |
|---|---|---|
| pluginName | String | |
| path | String |
| Type | Description |
|---|---|
| String |