Methods
(static) getAppSetting(key) → {string}
Get the specified configuration key
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key of the setting to find |
- Source:
Returns:
The application key setting
- 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:
The value of the setting
- 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:
The value of the setting
- Type
- String
(static) getAsync() → {Promise}
Get the configuration, nb: this caches the configuration
- Source:
Returns:
The configuration
- Type
- Promise
(static) getDataProvidersAsync() → {Promise}
Gets a list of data providers available on this offline provider mode
- Source:
Returns:
The data providers
- Type
- Promise
(static) getRealm() → {string}
Gets the currently configured realm
- Source:
Returns:
The name of the security realm
- 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:
A JSON object representing the configuration setting section
- Type
- any
(static) getUserPreferencesAsync() → {Promise}
Gets the user specific preferences
- Source:
Returns:
A promise representing the retrieval of the user settings
- 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:
The configuration file after joining the realm
- Type
- Promise
(static) leaveRealmAsync() → {Promise}
Instructs the application to remove realm configuration
- Source:
Returns:
A promise that is fulfilled when the leave operation succeeds
- Type
- Promise
(static) saveAsync(configuration) → {Promise}
Save the configuration object
Parameters:
Name | Type | Description |
---|---|---|
configuration |
any | The configuration object to save |
- Source:
Returns:
A promise object indicating whether the save was successful
- 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:
A promise which indicates when preferences were saved
- 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