lucee.Componentcommandbox.system.services.ModuleService
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
CommandService
|
true
|
false
|
|
any
|
ConfigService
|
true
|
false
|
|
any
|
EndpointService
|
true
|
false
|
|
any
|
SystemSettings
|
true
|
false
|
|
any
|
consoleLogger
|
true
|
false
|
|
any
|
fileSystemUtil
|
true
|
false
|
|
any
|
moduleData
|
true
|
false
|
Constructor Summary | |
---|---|
init(any shell)
Constructor. |
Method Summary | |
---|---|
void
|
activateAllModules()
Go over all the loaded module configurations and activate them for usage within the application. |
ModuleService
|
activateModule(string moduleName)
Activate a module. |
private void
|
buildRegistry(array locations)
Build the modules registry. |
private boolean
|
canLoad(string moduleName)
Checks if the module can be loaded or registered. |
void
|
configure()
Called by loader service when configuration file loads. |
string
|
getCommandService()
|
string
|
getConfigService()
|
string
|
getConsoleLogger()
|
string
|
getEndpointService()
|
string
|
getFileSystemUtil()
|
array
|
getLoadedModules()
Get a listing of all loaded modules. |
struct
|
getModuleConfigCache()
Return the loaded module's configuration objects. |
string
|
getModuleData()
|
struct
|
getModuleRegistry()
Get the discovered module's registry structure. |
any
|
getShell()
|
string
|
getSystemSettings()
|
boolean
|
isModuleActive(string moduleName)
Check and see if a module has been activated. |
boolean
|
isModuleRegistered(string moduleName)
Check and see if a module has been registered. |
any
|
loadMappings()
Load all module mappings. |
any
|
loadModuleConfiguration(struct config, string moduleName)
Load the module configuration object and return it. |
void
|
onShutdown()
Called when the application stops. |
any
|
overrideAllConfigSettings()
|
any
|
overrideConfigSettings(struct moduleSettings, string moduleName)
|
any
|
rebuildModuleRegistry()
Rescan the module locations directories and re-register all located modules, this method does NOT register or activate any modules, it just reloads the found registry. |
ModuleService
|
registerAllModules()
Register all modules for the application. |
void
|
registerAndActivateModule(string moduleName, [string invocationPath=''])
Register and activate a new module. |
boolean
|
registerModule(string moduleName, [string invocationPath=''], [string parent=''], [boolean force='false'])
Register a module's configuration information and config object. |
void
|
reload(string moduleName)
Reload a targeted module. |
void
|
reloadAll()
Reload all modules. |
private void
|
scanModulesDirectory(string dirPath)
Get an array of modules found and add to the registry structure. |
any
|
setCommandService(any CommandService)
|
any
|
setConfigService(any ConfigService)
|
any
|
setConsoleLogger(any consoleLogger)
|
any
|
setEndpointService(any EndpointService)
|
any
|
setFileSystemUtil(any fileSystemUtil)
|
any
|
setModuleData(any moduleData)
|
any
|
setSystemSettings(any SystemSettings)
|
boolean
|
unload(string moduleName)
Unload a module if found from the configuration. |
void
|
unloadAll()
Unload all registered modules. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
shell
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyinject
- CommandServiceserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- Configserviceserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- EndpointServiceserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- SystemSettingsserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- logbox:logger:consoleserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- FileSystemserializable
- trueaccess
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Go over all the loaded module configurations and activate them for usage within the application
Activate a module
moduleName
- The name of the module to load. It must exist and be valid. Else we ignore it by logging a warning and returning false.Build the modules registry
locations
- The array of locations to registerChecks if the module can be loaded or registered
moduleName
- The module nameCalled by loader service when configuration file loads
Get a listing of all loaded modules
Return the loaded module's configuration objects
Get the discovered module's registry structure
Check and see if a module has been activated
moduleName
Check and see if a module has been registered
moduleName
Load all module mappings
Load the module configuration object and return it
config
- The module config structuremoduleName
- The module nameCalled when the application stops
moduleSettings
- The module setting structuremoduleName
- The module nameRescan the module locations directories and re-register all located modules, this method does NOT register or activate any modules, it just reloads the found registry
Register all modules for the application. Usually called by framework to load configuration data.
Register and activate a new module
moduleName
- The name of the module to load.invocationPath
- The module's invocation path to its root from the webroot (the instantiation path,ex:myapp.myCustomModules), if empty we use registry location, if not we are doing a explicit name+path registration. Do not include the module name, you passed that in the first argument rightRegister a module's configuration information and config object
moduleName
- The name of the module to load.invocationPath
- The module's invocation path to its root from the webroot (the instantiation path,ex:myapp.myCustomModules), if empty we use registry location, if not we are doing a explicit name+path registration. Do not include the module name, you passed that in the first argument rightparent
- The name of the parent moduleforce
- Force a registrationReload a targeted module
moduleName
- The module to reloadReload all modules
Get an array of modules found and add to the registry structure
dirPath
- Path to scanCommandService
ConfigService
consoleLogger
EndpointService
fileSystemUtil
moduleData
SystemSettings
Unload a module if found from the configuration
moduleName
- The module name to unloadUnload all registered modules