ContentBox Core API 1.6.0

contentbox.model.modules
Class ModuleService

WEB-INF.cftags.component
        extended by coldbox.system.orm.hibernate.BaseORMService
            extended by coldbox.system.orm.hibernate.VirtualEntityService
                extended by contentbox.model.modules.ModuleService

public class ModuleService
extends coldbox.system.orm.hibernate.VirtualEntityService

******************************************************************************* ContentBox - A Modular Content Platform Copyright 2012 by Luis Majano and Ortus Solutions, Corp www.gocontentbox.org | www.luismajano.com | 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 & Description Default Serializable Required
 any coldboxModuleService


Attributes:
  • inject = coldbox:moduleService
true false
 any contentBoxSettings


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


Attributes:
  • inject = logbox:logger:{this}
true false
 struct moduleWidgetCache


Attributes:
true false
 string modulesInvocationPath


Attributes:
true false
 string modulesPath


Attributes:
true false
 any settingService


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


Attributes:
  • inject = coldbox:plugin:Zip
true false
 
Constructor Summary
init()
          Constructor
 
Method Summary
 any GETCOLDBOXMODULESERVICE()
          get:
 any GETCONTENTBOXSETTINGS()
          get:
 any GETLOG()
          get:
 string GETMODULESINVOCATIONPATH()
          get:
 string GETMODULESPATH()
          get:
 struct GETMODULEWIDGETCACHE()
          get:
 any GETSETTINGSERVICE()
          get:
 any GETZIPUTIL()
          get:
 ModuleService SETCOLDBOXMODULESERVICE(any coldboxModuleService)
          set:
 ModuleService SETCONTENTBOXSETTINGS(any contentBoxSettings)
          set:
 ModuleService SETLOG(any log)
          set:
 ModuleService SETMODULESINVOCATIONPATH(string modulesInvocationPath)
          set:
 ModuleService SETMODULESPATH(string modulesPath)
          set:
 ModuleService SETMODULEWIDGETCACHE(struct moduleWidgetCache)
          set:
 ModuleService SETSETTINGSERVICE(any settingService)
          set:
 ModuleService SETZIPUTIL(any zipUtil)
          set:
 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 return null
 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 getModuleWidgetPath(string widgetName)
          gets path for requested widget from modules' widget cache returns String
private query getModulesOnDisk(any path)
 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
 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
GETDATASOURCE, GETENTITYNAME, SETDATASOURCE, SETENTITYNAME, clear, convertIDValueToJavaType, convertValueToJavaType, count, countWhere, criteriaCount, criteriaQuery, deleteAll, deleteByID, deleteByQuery, deleteWhere, evict, executeQuery, exists, findAllWhere, findWhere, get, getAll, getKey, getPropertyNames, getSessionStatistics, getTableName, isSessionDirty, list, new, newCriteria, onMissingMethod
 
Methods inherited from class coldbox.system.orm.hibernate.BaseORMService
$delete, $deleteAll, $deleteByID, $deleteByQuery, $deleteWhere, $save, $saveAll, $transactioned, GETDEFAULTASQUERY, GETEVENTHANDLING, GETHQLDYNAMICCACHE, GETORM, GETORMEVENTHANDLER, GETQUERYCACHEREGION, GETUSEQUERYCACHING, GETUSETRANSACTIONS, SETDEFAULTASQUERY, SETEVENTHANDLING, SETHQLDYNAMICCACHE, SETORM, SETORMEVENTHANDLER, SETQUERYCACHEREGION, SETUSEQUERYCACHING, SETUSETRANSACTIONS, compileHQLFromDynamicMethod, createCriteriaQuery, createService, delete, evictEntity, evictQueries, findAll, findByExample, findDynamically, findIt, getEntityGivenName, getRestrictions, merge, populate, populateFromJSON, populateFromQuery, populateFromXML, populateWithPrefix, refresh, save, saveAll, sessionContains
 
Methods inherited from class WEB-INF.cftags.component
None
 

Constructor Detail

init

public init()
Constructor

Property Detail

coldboxModuleService

any coldboxModuleService

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

contentBoxSettings

any contentBoxSettings

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

log

any log

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

moduleWidgetCache

struct moduleWidgetCache

Attributes:
default -
serializable - true
required - false

modulesInvocationPath

string modulesInvocationPath

Attributes:
default -
serializable - true
required - false

modulesPath

string modulesPath

Attributes:
default -
serializable - true
required - false

settingService

any settingService

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

zipUtil

any zipUtil

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

Method Detail

GETCOLDBOXMODULESERVICE

public any GETCOLDBOXMODULESERVICE()
get:


GETCONTENTBOXSETTINGS

public any GETCONTENTBOXSETTINGS()
get:


GETLOG

public any GETLOG()
get:


GETMODULESINVOCATIONPATH

public string GETMODULESINVOCATIONPATH()
get:


GETMODULESPATH

public string GETMODULESPATH()
get:


GETMODULEWIDGETCACHE

public struct GETMODULEWIDGETCACHE()
get:


GETSETTINGSERVICE

public any GETSETTINGSERVICE()
get:


GETZIPUTIL

public any GETZIPUTIL()
get:


SETCOLDBOXMODULESERVICE

public ModuleService SETCOLDBOXMODULESERVICE(any coldboxModuleService)
set:

Parameters:
coldboxModuleService

SETCONTENTBOXSETTINGS

public ModuleService SETCONTENTBOXSETTINGS(any contentBoxSettings)
set:

Parameters:
contentBoxSettings

SETLOG

public ModuleService SETLOG(any log)
set:

Parameters:
log

SETMODULESINVOCATIONPATH

public ModuleService SETMODULESINVOCATIONPATH(string modulesInvocationPath)
set:

Parameters:
modulesInvocationPath

SETMODULESPATH

public ModuleService SETMODULESPATH(string modulesPath)
set:

Parameters:
modulesPath

SETMODULEWIDGETCACHE

public ModuleService SETMODULEWIDGETCACHE(struct moduleWidgetCache)
set:

Parameters:
moduleWidgetCache

SETSETTINGSERVICE

public ModuleService SETSETTINGSERVICE(any settingService)
set:

Parameters:
settingService

SETZIPUTIL

public ModuleService SETZIPUTIL(any zipUtil)
set:

Parameters:
zipUtil

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

getModuleWidgetPath

public string getModuleWidgetPath(string widgetName)
gets path for requested widget from modules' widget cache returns String

Parameters:
widgetName - {String}

getModulesOnDisk

private query getModulesOnDisk(any path)

Parameters:
path

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


startup

public ModuleService startup()
Startup the modules


uploadModule

public struct uploadModule(any fileField)
Upload Module, returns structure with [error:boolean, logInfo=string]

Parameters:
fileField

ContentBox Core API 1.6.0