API jar - RapturePlatform/Rapture GitHub Wiki

Jar API

The JAR api is used to manage the storage of Java Archive (JAR) files for use by a Rapture server.

jarExists

HttpJarApi jarApi = new HttpJarApi(loginApi);
boolean retVal = jarApi.jarExists(jarUri);
retVal = baseAPI.doJar_JarExists(jarUri);

Entitlement: /data/list/$f(jarUri)

Indicates whether a given JAR exists.

Function Parameters

Parameter Type Description
jarUri String

Return value

Type Description
boolean

putJar

HttpJarApi jarApi = new HttpJarApi(loginApi);
void retVal = jarApi.putJar(jarUri, jarContent);
retVal = baseAPI.doJar_PutJar(jarUri, jarContent);

Entitlement: /data/write/$f(jarUri)

Stores a JAR.

Function Parameters

Parameter Type Description
jarUri String
jarContent byte[]

Return value

Type Description
void

getJar

HttpJarApi jarApi = new HttpJarApi(loginApi);
BlobContainer retVal = jarApi.getJar(jarUri);
retVal = baseAPI.doJar_GetJar(jarUri);

Entitlement: /data/read/$f(jarUri)

Retrieves a JAR and its metadata. The JAR is represented as a byte array.

Function Parameters

Parameter Type Description
jarUri String

Return value

Type Description
BlobContainer
Types used in this function

BlobContainer

Describes a blob repository.

Field Type
headers Map(String, String)
content ByteArray

deleteJar

HttpJarApi jarApi = new HttpJarApi(loginApi);
void retVal = jarApi.deleteJar(jarUri);
retVal = baseAPI.doJar_DeleteJar(jarUri);

Entitlement: /data/write/$f(jarUri)

Removes a JAR from the backing store. There is no undo.

Function Parameters

Parameter Type Description
jarUri String

Return value

Type Description
void

getJarSize

HttpJarApi jarApi = new HttpJarApi(loginApi);
Long retVal = jarApi.getJarSize(jarUri);
retVal = baseAPI.doJar_GetJarSize(jarUri);

Entitlement: /data/list/$f(jarUri)

Retrieves the number of bytes in a JAR.

Function Parameters

Parameter Type Description
jarUri String

Return value

Type Description
Long

getJarMetaData

HttpJarApi jarApi = new HttpJarApi(loginApi);
Map<String,String> retVal = jarApi.getJarMetaData(jarUri);
retVal = baseAPI.doJar_GetJarMetaData(jarUri);

Entitlement: /data/list/$f(jarUri)

Retrieves all metadata associated with a JAR.

Function Parameters

Parameter Type Description
jarUri String

Return value

Type Description
Map<String,String>

listJarsByUriPrefix

HttpJarApi jarApi = new HttpJarApi(loginApi);
Map<String,RaptureFolderInfo> retVal = jarApi.listJarsByUriPrefix(uriPrefix, depth);
retVal = baseAPI.doJar_ListJarsByUriPrefix(uriPrefix, depth);

Entitlement: /data/list/$f(uriPrefix)

Returns full pathnames for an entire subtree as a map of the path to RFI.

Function Parameters

Parameter Type Description
uriPrefix String
depth int

Return value

Type Description
Map<String,RaptureFolderInfo>

jarIsEnabled

HttpJarApi jarApi = new HttpJarApi(loginApi);
boolean retVal = jarApi.jarIsEnabled(jarUri);
retVal = baseAPI.doJar_JarIsEnabled(jarUri);

Entitlement: /data/list/$f(jarUri)

Indicates whether a given JAR is enabled on this server.

Function Parameters

Parameter Type Description
jarUri String

Return value

Type Description
boolean

enableJar

HttpJarApi jarApi = new HttpJarApi(loginApi);
void retVal = jarApi.enableJar(jarUri);
retVal = baseAPI.doJar_EnableJar(jarUri);

Entitlement: /admin/jar

Enables a JAR to be used on this server.

Function Parameters

Parameter Type Description
jarUri String

Return value

Type Description
void

disableJar

HttpJarApi jarApi = new HttpJarApi(loginApi);
void retVal = jarApi.disableJar(jarUri);
retVal = baseAPI.doJar_DisableJar(jarUri);

Entitlement: /admin/jar

Disables a JAR from being used on this server.

Function Parameters

Parameter Type Description
jarUri String

Return value

Type Description
void
⚠️ **GitHub.com Fallback** ⚠️