lucee.Component
commandbox.system.services.ConfigService
Copyright Since 2014 CommandBox by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com I handle working with the CommandBox.json file
| Property Summary | ||||
|---|---|---|---|---|
| type | property | default | serializable | required |
any
|
JSONService
|
true
|
false
|
|
any
|
ModuleService
|
true
|
false
|
|
any
|
ServerService
|
true
|
false
|
|
any
|
configFilePath
|
true
|
false
|
|
any
|
configSettingOverrides
|
true
|
false
|
|
any
|
configSettings
|
true
|
false
|
|
any
|
formatterUtil
|
true
|
false
|
|
any
|
interceptorService
|
true
|
false
|
|
any
|
possibleConfigSettings
|
true
|
false
|
|
boolean
|
serverServiceCompletePerformed
|
false
|
true
|
false
|
| Constructor Summary | |
|---|---|
|
init()
Constructor. |
|
| Method Summary | |
|---|---|
any
|
completeProperty([any all='false'], [any asSet='false'])
Dynamic completion for property name based on contents of commandbox. |
string
|
getConfigFilePath()
|
string
|
getConfigSettingOverrides()
|
any
|
getConfigSettings([boolean noOverrides='false'])
Return all config settings including env var/sys prop overrides. |
string
|
getFormatterUtil()
|
string
|
getInterceptorService()
|
string
|
getJSONService()
|
string
|
getModuleService()
|
string
|
getPossibleConfigSettings()
|
string
|
getServerService()
|
string
|
getServerServiceCompletePerformed()
|
any
|
getSetting(any name, [any defaultValue])
Get a setting from a configuration structure. |
any
|
getSettingJMES(any name, [any defaultValue])
Get a setting from a configuration structure with JMESPath. |
any
|
loadConfig()
Loads config settings from disk. |
any
|
loadOverrides()
Loads config settings from env vars or Java system properties. |
any
|
onDIComplete()
|
any
|
removeSetting(any name)
Remove a value in the application configuration settings. |
any
|
saveConfig()
Persists config settings to disk. |
any
|
setConfigFilePath(any configFilePath)
|
any
|
setConfigSettingOverrides(any configSettingOverrides)
|
any
|
setConfigSettings(struct configSettings)
|
any
|
setFormatterUtil(any formatterUtil)
|
any
|
setInterceptorService(any interceptorService)
|
any
|
setJSONService(any JSONService)
|
any
|
setModuleService(any ModuleService)
|
any
|
setPossibleConfigSettings(any possibleConfigSettings)
|
any
|
setServerService(any ServerService)
|
any
|
setServerServiceCompletePerformed(boolean serverServiceCompletePerformed)
|
any
|
setSetting(any name, any value, [boolean thisAppend='false'])
Set a value in the application configuration settings. |
boolean
|
settingExists(any name)
Check if a value exists in a configuration structure. |
| Methods inherited from class lucee.Component |
|---|
| None |
| Constructor Detail |
|---|
Constructor
| Property Detail |
|---|
access - publicrequired - falsereturntype - anyinject - JSONServiceserializable - trueaccess - publicrequired - falsereturntype - anyinject - ModuleServiceserializable - trueaccess - publicrequired - falsereturntype - anyinject - provider:ServerServiceserializable - trueaccess - publicrequired - falsereturntype - anyserializable - trueaccess - publicrequired - falsereturntype - anyserializable - trueaccess - publicrequired - falsereturntype - anyserializable - trueaccess - publicrequired - falsereturntype - anyinject - formatterserializable - trueaccess - publicrequired - falsereturntype - anyinject - interceptorServiceserializable - trueaccess - publicrequired - falsereturntype - anyserializable - trueaccess - publicrequired - falsereturntype - anyserializable - true| Method Detail |
|---|
Dynamic completion for property name based on contents of commandbox.json
all - Pass false to ONLY suggest existing setting names. True will suggest all possible settings.asSet - Pass true to add = to the end of the optionsReturn all config settings including env var/sys prop overrides
noOverridesGet a setting from a configuration structure
name - The name of the setting. Allows for "deep" struct/array names.defaultValue - The default value to use if setting does not existGet a setting from a configuration structure with JMESPath
name - The name of the setting. Allows for "deep" struct/array names.defaultValue - The default value to use if setting does not existLoads config settings from disk
Loads config settings from env vars or Java system properties
Remove a value in the application configuration settings
name - The name of the setting. Allows for "deep" struct/array names.Persists config settings to disk
configFilePathconfigSettingOverridesconfigSettingsformatterUtilinterceptorServiceJSONServiceModuleServicepossibleConfigSettingsServerServiceserverServiceCompletePerformedSet a value in the application configuration settings
name - The name of the setting. Allows for "deep" struct/array names.value - The value to setthisAppend - Append an array or struct to existingCheck if a value exists in a configuration structure
name - The name of the setting. Allows for "deep" struct/array names.