Class: ConfigurationApi

SanteDBWrapper.ConfigurationApi()

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:
True if the subscription definition can be selected
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:
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) getAssignedFacilityId() → {string}

Get the configured facility identifier

Source:
Returns:
The identifier of the facility
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:
The configuration
Type
Promise

(static) getClientId() → {string}

Get the OAUTH client identifier

Source:
Returns:
The name of the client Id
Type
string

(static) getDataProvidersAsync() → {Promise}

Gets a list of data providers available on this offline provider mode

Source:
Returns:
The data providers
Type
Promise

(static) getDeviceId() → {string}

Get the device identifier

Source:
Returns:
The name of the device
Type
string

(static) getIntegrationPatternsAsync() → {Promise}

Gets a list of data integration modes which are supported by this server

Source:
Returns:
The data integration modes
Type
Promise

(static) getOwnerId() → {string}

Get the configured owner of this device

Source:
Returns:
The identifier of the device
Type
string

(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) getUserSettingsAsync() → {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
Name Type Description
address string The domain to which the application is to be joined
device string The name of the device to join as
replaceExisting boolean When true, instructs the application to replace an existing registration
enableTrace boolean When true, enables log file tracing of requests
enableSSL boolean When true, enables HTTPS
noTimeout boolean When true, removes all timeouts from the configuration
port number The port number to connect to the realm on
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