contentbox.model.modules

Class ModuleService

railo-context.Component
        extended by coldbox.system.orm.hibernate.BaseORMService
            extended by coldbox.system.orm.hibernate.VirtualEntityService
                extended by contentbox.model.modules.ModuleService
Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  

    ContentBox - A Modular Content Platform Copyright 2012 by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com Apache License, Version 2.0 Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Manage ContentBox Modules

    Property Summary
    type property default serializable required
    any coldboxModuleService


    • inject = coldbox:moduleService
    true false
    any contentBoxSettings


    • inject = coldbox:moduleConfig:contentbox
    true false
    any log


    • inject = logbox:logger:{this}
    true false
    string modulesInvocationPath


    true false
    string modulesPath


    true false
    struct moduleWidgetCache


    true false
    any settingService


    • inject = id:settingService@cb
    true false
    any zipUtil


    • inject = coldbox:plugin:Zip
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    ModuleService activateModule(any name)
         Activate a module from ContentBox.
    private void buildModuleWidgetsCache()
         Iterates over all registered, active modules and sets any found widgets into a cache in moduleservice.
    ModuleService deactivateModule(any name)
         Deactivate a module from ContentBox.
    ModuleService deleteModule(any name)
         Delete Module, should only be done on deactivated modules.
    private ModuleService detachColdBoxModuleRegistration(any name)
         Detach coldbox module configuration registrations.
    Module findModuleByEntryPoint(any entryPoint)
         findModuleByEntryPoint.
    struct findModules([any isActive='any'])
         findModules.
    string getColdboxModuleService()
    string getContentBoxSettings()
    string getLog()
    string getModulesInvocationPath()
    private query getModulesOnDisk(any path)
    string getModulesPath()
    string getModuleWidgetCache()
    string getModuleWidgetPath(string widgetName)
         gets path for requested widget from modules' widget cache.
    string getSettingService()
    string getZipUtil()
    any onDIComplete()
         onDIComplete.
    any populateModule([any module], [any config])
         Populate module from Module Configuration CFC and returns the module.
    Module registerNewModule(any name)
         Register a new module and return the module representation, this does not activate, just registers.
    ModuleService resetModules()
         Reset all modules by deactivating all of them and cleaning our db history.
    any setColdboxModuleService(any coldboxModuleService)
    any setContentBoxSettings(any contentBoxSettings)
    any setLog(any log)
    any setModulesInvocationPath(string modulesInvocationPath)
    any setModulesPath(string modulesPath)
    any setModuleWidgetCache(struct moduleWidgetCache)
    any setSettingService(any settingService)
    any setZipUtil(any zipUtil)
    ModuleService startup()
         Startup the modules.
    struct uploadModule(any fileField)
         Upload Module, returns structure with [error:boolean, logInfo=string].
     
    Methods inherited from class coldbox.system.orm.hibernate.VirtualEntityService
    clear, convertIDValueToJavaType, convertValueToJavaType, count, countWhere, criteriaCount, criteriaQuery, deleteAll, deleteByID, deleteByQuery, deleteWhere, evict, executeQuery, exists, findAllWhere, findWhere, get, getAll, getDatasource, getEntityName, getKey, getPropertyNames, getSessionStatistics, getTableName, isSessionDirty, list, new, newCriteria, onMissingMethod, setDatasource, setEntityName
     
    Methods inherited from class coldbox.system.orm.hibernate.BaseORMService
    $delete, $deleteAll, $deleteByID, $deleteByQuery, $deleteWhere, $save, $saveAll, $transactioned, compileHQLFromDynamicMethod, createCriteriaQuery, createService, delete, evictEntity, evictQueries, findAll, findByExample, findDynamically, findIt, getDefaultAsQuery, getEntityGivenName, getEventHandling, getHQLDynamicCache, getORM, getORMEventHandler, getQueryCacheRegion, getRestrictions, getUseQueryCaching, getUseTransactions, merge, populate, populateFromJSON, populateFromQuery, populateFromXML, populateWithPrefix, refresh, save, saveAll, sessionContains, setDefaultAsQuery, setEventHandling, setHQLDynamicCache, setORM, setORMEventHandler, setQueryCacheRegion, setUseQueryCaching, setUseTransactions
     
    Methods inherited from class railo-context.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    coldboxModuleService

    property any coldboxModuleService

    Attributes:
    required - false
    inject - coldbox:moduleService
    serializable - true

    contentBoxSettings

    property any contentBoxSettings

    Attributes:
    required - false
    inject - coldbox:moduleConfig:contentbox
    serializable - true

    log

    property any log

    Attributes:
    required - false
    inject - logbox:logger:{this}
    serializable - true

    modulesInvocationPath

    property string modulesInvocationPath

    Attributes:
    required - false
    serializable - true

    modulesPath

    property string modulesPath

    Attributes:
    required - false
    serializable - true

    moduleWidgetCache

    property struct moduleWidgetCache

    Attributes:
    required - false
    serializable - true

    settingService

    property any settingService

    Attributes:
    required - false
    inject - id:settingService@cb
    serializable - true

    zipUtil

    property any zipUtil

    Attributes:
    required - false
    inject - coldbox:plugin:Zip
    serializable - true

    Method Detail

    activateModule

    public ModuleService activateModule(any name)

    Activate a module from ContentBox

    Parameters:
    name

    buildModuleWidgetsCache

    private void buildModuleWidgetsCache()

    Iterates over all registered, active modules and sets any found widgets into a cache in moduleservice return null


    deactivateModule

    public ModuleService deactivateModule(any name)

    Deactivate a module from ContentBox

    Parameters:
    name

    deleteModule

    public ModuleService deleteModule(any name)

    Delete Module, should only be done on deactivated modules

    Parameters:
    name

    detachColdBoxModuleRegistration

    private ModuleService detachColdBoxModuleRegistration(any name)

    Detach coldbox module configuration registrations

    Parameters:
    name

    findModuleByEntryPoint

    public Module findModuleByEntryPoint(any entryPoint)

    findModuleByEntryPoint

    Parameters:
    entryPoint

    findModules

    public struct findModules([any isActive='any'])

    findModules

    Parameters:
    isActive - The active criteria, true, false or any for all modules

    getColdboxModuleService

    public string getColdboxModuleService()


    getContentBoxSettings

    public string getContentBoxSettings()


    getLog

    public string getLog()


    getModulesInvocationPath

    public string getModulesInvocationPath()


    getModulesOnDisk

    private query getModulesOnDisk(any path)

    Parameters:
    path

    getModulesPath

    public string getModulesPath()


    getModuleWidgetCache

    public string getModuleWidgetCache()


    getModuleWidgetPath

    public string getModuleWidgetPath(string widgetName)

    gets path for requested widget from modules' widget cache returns String

    Parameters:
    widgetName - {String}

    getSettingService

    public string getSettingService()


    getZipUtil

    public string getZipUtil()


    onDIComplete

    public any onDIComplete()

    onDIComplete


    populateModule

    public any populateModule([any module], [any config])

    Populate module from Module Configuration CFC and returns the module

    Parameters:
    module
    config

    registerNewModule

    public Module registerNewModule(any name)

    Register a new module and return the module representation, this does not activate, just registers

    Parameters:
    name

    resetModules

    public ModuleService resetModules()

    Reset all modules by deactivating all of them and cleaning our db history


    setColdboxModuleService

    public any setColdboxModuleService(any coldboxModuleService)

    Parameters:
    coldboxModuleService

    setContentBoxSettings

    public any setContentBoxSettings(any contentBoxSettings)

    Parameters:
    contentBoxSettings

    setLog

    public any setLog(any log)

    Parameters:
    log

    setModulesInvocationPath

    public any setModulesInvocationPath(string modulesInvocationPath)

    Parameters:
    modulesInvocationPath

    setModulesPath

    public any setModulesPath(string modulesPath)

    Parameters:
    modulesPath

    setModuleWidgetCache

    public any setModuleWidgetCache(struct moduleWidgetCache)

    Parameters:
    moduleWidgetCache

    setSettingService

    public any setSettingService(any settingService)

    Parameters:
    settingService

    setZipUtil

    public any setZipUtil(any zipUtil)

    Parameters:
    zipUtil

    startup

    public ModuleService startup()

    Startup the modules


    uploadModule

    public struct uploadModule(any fileField)

    Upload Module, returns structure with [error:boolean, logInfo=string]

    Parameters:
    fileField