new ConfigurationApi()
API For interacting with configuration
- Source:
Methods
(static) canSelectSubscription(subscriptionDefinition, subscribedObjects) → {boolean}
Determines whether the subscription definition can be selected based on the subscribed objects
Parameters:
Name | Type | Description |
---|---|---|
subscriptionDefinition |
SubscriptionDefinition | The subscription definition |
subscribedObjects |
object | The objects for which the subscription check is being performed |
- Source:
Returns:
- Type
- boolean
(static) getAppSetting(key) → {string}
Get the specified configuration key
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key of the setting to find |
- Source:
Returns:
- Type
- string
(static) getAppSettingAsync(key) → {String}
Retrieve the specified application setting directly from the configuration API
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key of the setting to retrieve |
- Source:
Returns:
- Type
- String
(static) getAppSettingAsync(key) → {String}
Retrieve the specified application setting directly from the configuration API
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key of the setting to retrieve |
- Source:
Returns:
- Type
- String
(static) getAssignedFacilityId() → {string}
Get the configured facility identifier
- Source:
Returns:
- Type
- string
(static) getAsync(forceServerRefresh) → {Promise}
Get the configuration, nb: this caches the configuration
Parameters:
Name | Type | Description |
---|---|---|
forceServerRefresh |
bool | True if the cache should be discarded and the configuration re-fetched |
- Source:
Returns:
- Type
- Promise
(static) getClientId() → {string}
Get the OAUTH client identifier
- Source:
Returns:
- Type
- string
(static) getDataProvidersAsync() → {Promise}
Gets a list of data providers available on this offline provider mode
- Source:
Returns:
- Type
- Promise
(static) getDeviceId() → {string}
Get the device identifier
- Source:
Returns:
- Type
- string
(static) getIntegrationPatternsAsync() → {Promise}
Gets a list of data integration modes which are supported by this server
- Source:
Returns:
- Type
- Promise
(static) getOwnerId() → {string}
Get the configured owner of this device
- Source:
Returns:
- Type
- string
(static) getRealm() → {string}
Gets the currently configured realm
- Source:
Returns:
- Type
- string
(static) getSection(name) → {any}
Gets the specified section name
Parameters:
Name | Type | Description |
---|---|---|
name |
any | The name of the configuration section |
- Source:
Returns:
- Type
- any
(static) getUserSettingsAsync() → {Promise}
Gets the user specific preferences
- Source:
Returns:
- Type
- Promise
(static) joinRealmAsync(configData, overwrite) → {Promise}
Instructs the current system to join a realm
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
configData |
any | The configuration data for the realm
Properties
|
||||||||||||||||||||||||
overwrite |
boolean | Overwrites the existing configuration if needed |
- Source:
Returns:
- Type
- Promise
(static) leaveRealmAsync() → {Promise}
Instructs the application to remove realm configuration
- Source:
Returns:
- Type
- Promise
(static) saveAsync(configuration) → {Promise}
Save the configuration object
Parameters:
Name | Type | Description |
---|---|---|
configuration |
any | The configuration object to save |
- Source:
Returns:
- Type
- Promise
(static) saveUserPreferencesAsync(preferences) → {Promise}
Saves the user preferences
Parameters:
Name | Type | Description |
---|---|---|
preferences |
any | A dictionary of preferences to be saved |
- Source:
Returns:
- Type
- Promise
Example
Save user preference for color
SanteDB.configuration.saveUserPreferences([
{ key: "color", value: "red" }
]);
(static) setAppSetting(key, value)
Sets the specified application setting
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key of the setting to set |
value |
string | The value of the application setting |
- Source:
- See:
-
- SanteDB.configuration.save To save the updated configuration