Contains all the functions to manage the loading and processing of data, such as XML files, CSV files or JSON files. Additional file type processing should be added in this module.
- Copyright:
- Copyright © 2022-… by Seth Hollingsead. All rights reserved
- Source:
Requires
Methods
(inner) addConstantsValidationData(arrayValidationData) → {void}
Calls the dataBroker to ad constants validation data to the constants validation data structure.
Parameters:
| Name | Type | Description |
|---|---|---|
arrayValidationData |
array.<array.<string, object>> | An array of arrays that contains all of the constants library validation names and data objects. |
- Source:
Returns:
- Type
- void
(inner) determineThemeDebugConfigFilesToLoad(themeConfigPathName) → {array.<string>}
If the debugSettings flag is already set, then look up the specified path name and scan the path to determine all of the theme debug config files that should be loaded.
Parameters:
| Name | Type | Description |
|---|---|---|
themeConfigPathName |
string | The configuration name of the path that should be looked up for scaning purposes. |
- Source:
Returns:
An array of file names and paths that should be used when loading the theme debug configuration files.
- Type
- array.<string>
(inner) getAndProcessCsvData(pathAndFilename, contextName) → {object}
Loads the specified file, parses it and converts all the data to the appropriate format.
Parameters:
| Name | Type | Description |
|---|---|---|
pathAndFilename |
string | The path and file name of the CSV file that should be loaded and parsed into JSON objects. |
contextName |
string | The name that should be used when adding the objects to the D data structure for data-sharing. |
- Source:
Returns:
A parsed CSV JSON object where all the values have been converted from their string representation into actual values of appropriate type.
- Type
- object
(inner) getAndProcessXmlData(pathAndFilename) → {object}
Loads the specified file, parses it and converts all values into their appropriate data types.
Parameters:
| Name | Type | Description |
|---|---|---|
pathAndFilename |
string | The path and file name of the XML file that should be loaded and parsed into JSON objects. |
- Source:
Returns:
A parsed XML JSON object where all the values have been converted from their string representation into actual values of appropriate type.
- Type
- object
(inner) initializeConstantsValidationData() → {void}
Calls the dataBroker to initialize the constants verification data structure.
- Source:
Returns:
- Type
- void
(inner) searchForUniversalDebugConfigSetting(appConfigPathName, frameworkConfigPathName) → {boolean}
Searches all of the config data files for a general solution to the debugSettings configuration setting.
Parameters:
| Name | Type | Description |
|---|---|---|
appConfigPathName |
string | The name of the configuration setting that has the path for the appConfigPath. |
frameworkConfigPathName |
string | The name of the configuration setting that has the path for the frameworkConfigPath. |
- Source:
Returns:
A True or False to indicate if the debugSettings was found to be true in either of the configuration settings (appConfig Or frameworkConfig).
- Type
- boolean
(inner) setupAllCsvData(dataPathConfigurationName, contextName) → {object}
Sets up all of the specified CSV data.
Parameters:
| Name | Type | Description |
|---|---|---|
dataPathConfigurationName |
string | The name of the configuration setting that has the path we should search. |
contextName |
string | The context name that should be used when adding data to the D data structure. |
- Source:
Returns:
A JSON object that contains all of the data that was loaded from all the CSV files and merged together.
- Type
- object
(inner) setupAllJsonConfigData(dataPathConfigurationName, contextName) → {object}
Sets up all of the JSON data at the specified configuration path.
Parameters:
| Name | Type | Description |
|---|---|---|
dataPathConfigurationName |
string | The name of the configuration setting that has the path we should search. |
contextName |
string | The context name that should be used when adding data to the D data structure. |
- Source:
Returns:
A JSON object that contains all of the data that was loaded and merged together.
- Type
- object
(inner) setupAllXmlData(dataPathConfigurationName, contextName) → {object}
Sets up all of the specified XML data.
Parameters:
| Name | Type | Description |
|---|---|---|
dataPathConfigurationName |
string | The name of the configuration setting that has the path we should search. |
contextName |
string | The context name that should be used when adding data to the D data structure. |
- Source:
Returns:
A JSON object that contains all of the data that was loaded from all the XML files and merged together.
- Type
- object