Methods
get_configuration(package_id) → {object|null}
Gets the configuration instance associated with a package.
Parameters:
| Name | Type | Description |
|---|---|---|
package_id |
string | the id of the package |
Returns:
the configuration instance or null if no configuration is defined for the package
- Type
- object | null
(async) get_data(key) → {Promise.<(ArrayBuffer|null)>}
Retrieve data associated with a key or null if no data is associated with that key
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | the key value |
Returns:
- Type
- Promise.<(ArrayBuffer|null)>
get_package_id() → {string}
Get the unique ID of this package
Returns:
the package id
- Type
- string
(async) get_properties() → {Object}
Get the properties associated with this configuration
Returns:
the value of the properties
- Type
- Object
request_open_client(client_name:, session_id:)
Called to request that a client of this configuration be opened
Parameters:
| Name | Type | Description |
|---|---|---|
client_name: |
string | the type of client to load |
session_id: |
string | undefined | the session in which the client should be opened (if undefined, open in all sessions) |
resolve_resource(resource_path)
Resolve a relative resource path based on the location of the package schema
Parameters:
| Name | Type | Description |
|---|---|---|
resource_path |
(async) set_data(key, data) → {Promise.<void>}
Store data associated with a key
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | the key value |
data |
ArrayBuffer | null | the data value (pass null to delete data associated with the key) |
Returns:
- Type
- Promise.<void>
(async) set_properties(properties)
Set the properties associated with this configuration
Parameters:
| Name | Type | Description |
|---|---|---|
properties |
Object | the properties to set, must be an Object that is JSON serialisable |
set_status(status_msg, level,)
Sets an informational status message for this package
Parameters:
| Name | Type | Description |
|---|---|---|
status_msg |
string | the status message, or empty string to clear the status |
level, |
string | one of "info", "warning", "error" |