Contains the functions necessary to set and get configuration settings from the shared data structure.
- Copyright:
- Copyright © 2022-… by Seth Hollingsead. All rights reserved
- Source:
Requires
Methods
(inner) getConfigurationNamespaceObject(configurationNamespace) → {object|boolean}
Navigates the configuration JSON data object tree to find the namespace of configuration settings.
Parameters:
| Name | Type | Description |
|---|---|---|
configurationNamespace |
array.<string> | The path in the configuration JSON object where the configuration setting should be set, or returned. |
- Source:
Returns:
The object found at the specified namespace address in the configuration data object, or False if nothing was found.
- Type
- object | boolean
(inner) getConfigurationSetting(configurationNamespace, configurationName) → {string|integer|boolean|double}
Gets a configuration value based on the configuration name.
Parameters:
| Name | Type | Description |
|---|---|---|
configurationNamespace |
string | The path in the configuration JSON object where the configuration setting should be found. |
configurationName |
string | The key of the configuration setting. |
- Source:
Returns:
The value of whatever was stored in the D[configuration].
- Type
- string | integer | boolean | double
(inner) getParentConfigurationNamespaceObject(configurationNamespace, optionalFunctionNameAppendix) → {object|boolean}
Navigates the configuration JSON data object tree to find the namespace of the configuration setting, and then determines the parent and returns the entire tree of the configuration data including that parent and all its top level contents.
Parameters:
| Name | Type | Description |
|---|---|---|
configurationNamespace |
string | The fully qualified path in the configuration JSON object where the configuration setting should be found. |
optionalFunctionNameAppendix |
string | An optional function name appendix that could potentially be added to the end of the function name. Ex: @ModuleFontBackgroundColor |
- Source:
Returns:
The parent of the object found at the specified namespace address in the configuration data object, or False if nothing was found.
- Type
- object | boolean
(inner) processConfigurationNameRules(fullyQualifiedName) → {string}
Processes a fully qualified name and extracts the configuration name without the namespace.
Parameters:
| Name | Type | Description |
|---|---|---|
fullyQualifiedName |
string | The fully qualified name with the namespace included. |
- Source:
Returns:
The name of the configuration setting without the namespace.
- Type
- string
(inner) processConfigurationNamespaceRules(fullyQualifiedName) → {string}
Processes a fully qualified name and extracts the namespace.
Parameters:
| Name | Type | Description |
|---|---|---|
fullyQualifiedName |
string | The fully qualified name with the namespace included. |
- Source:
Returns:
The namespace of the configuration setting, without the configuration name.
- Type
- string
(inner) processConfigurationValueRules(name, value) → {string|boolean|integer|float|object}
Processes a name and value to execute required code and convert string values to actual data objects needed by the configuration system.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The name of the configuration variable, without the namespace. |
value |
string | The value of the configuration variable. |
- Source:
Returns:
A value that is appropriately processed.
- Type
- string | boolean | integer | float | object
(inner) setConfigurationSetting(configurationNamespace, configurationName, configurationValue) → {void}
Sets a configuration setting on the configuration data structure stored on the D-data structure.
Parameters:
| Name | Type | Description |
|---|---|---|
configurationNamespace |
string | The path in the configuration JSON object where the configuration setting should be set. Ex: businessRules.rules.stringParsing.countCamelCaseWords |
configurationName |
string | The key of the configuration setting. |
configurationValue |
string | integer | boolean | double | The value of the configuration setting. |
- Source:
Returns:
- Type
- void