Configuration Manager Service
Last updated
Last updated
IConfigurationManager
in assembly SanteDB.Core.Api version 3.0.1980.0
Contract for service implementations that manage the core SanteDB configuration
SanteDB plugins are expected to be portable and can run on a variety of platforms, in a variety of deployments, and a variety of environments. This necessitates a consistent manner to manage configuration data for the SanteDB services. The IConfigurationManager is responsible for this duty. Example implementations of this service may include:
Loading configuration from a file stored on a local file system
Loading configuration from a shared document-based database (for distributed configurations)
Loading configuration from environment variables or synthesization classes (like in Docker)
Loading/chaining configuration from another or central iCDR instance
Property | Type | Access | Description |
---|---|---|---|
A configuration manager which uses a temporary configuration in memory via implementations of IInitialConfigurationProvider
Provides a redirected configuration service which reads configuration information from a file
This configuration manager implementation reads from the configuration file santedb.config.xml
in the same directory as the installed iCDR instance. This file is create either manually (as documented here), or using the Configuration Tool.
A configuration manager which constructs a SanteDBConfiguration from environment variables
This implementation of the IConfigurationManager uses environment variables passed from a Dockerized Installation Environment so that SanteDB modules may operate as though they were configured from a static configuration file.
This class scans the SDB_FEATURE
environment variables and locates the IDockerFeature implementation for the specified environment variable. It then calls the Configure()
method on those implementations and builds an instance of the SanteDBConfiguration object based on those providers.
For more information about the Docker features and their configuration see the Docker Feature documentation article
Operation | Response/Return | Input/Parameter | Description |
---|---|---|---|
IsReadonly
Boolean
R
True if the configuration manager is readonly
Configuration
SanteDBConfiguration
R
Get the entirety of the SanteDB configuration
GetSection
T
none
TODO
GetAppSetting
String
String key
Gets the specified application setting
GetConnectionString
ConnectionString
String key
Get the specified connection string to a database
SetAppSetting
void
String key String value
Set the specified application setting
Reload
void
none
TODO
SaveConfiguration
void
Boolean restart
Save the configuration
SetTransientConnectionString
void
String name ConnectionString connectionString
Adds a connection string only for the lifetime of the server