| Package: MachII.framework |
| The main framework manager. |
<!--- License: Copyright 2008 GreatBizTools, LLC 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. Copyright: GreatBizTools, LLC $Id: AppManager.cfc 1117 2008-10-22 18:55:18Z peterfarrell $ Created version: 1.0.0 Updated version: 1.6.0 Notes: ---> |
| Method Summary | |
|---|---|
| public AppManager |
init()
Used by the framework for initialization. Do not override. |
| public void |
configure()
Calls configure() on each of the manager instances. |
| public any | getAppKey() |
| public AppLoader |
getAppLoader()
Returns the AppLoader instance. |
| public CacheManager | getCacheManager() |
| public EventManager | getEventManager() |
| public ExpressionEvaluator | getExpressionEvaluator() |
| public EventFilterManager | getFilterManager() |
| public ListenerManager | getListenerManager() |
| public LogFactory | getLogFactory() |
| public MessageManager | getMessageManager() |
| public ModuleManager | getModuleManager() |
| public string |
getModuleName()
Gets the module name for this instance of the AppManager. |
| public any | getParent() |
| public PluginManager | getPluginManager() |
| public PropertyManager | getPropertyManager() |
| public RequestHandler |
getRequestHandler([boolean createNew="false"])
Returns a new or cached instance of a RequestHandler. |
| public RequestManager | getRequestManager() |
| public SubroutineManager | getSubroutineManager() |
| public Utils | getUtils() |
| public ViewManager | getViewManager() |
| public any | isLoading() |
| public void |
onSessionEnd(struct sessionScope)
Handles on session end application event. |
| public void |
onSessionStart()
Handles on session start application event. |
| public void | setAppKey(string appkey) |
| public void |
setAppLoader(AppLoader appLoader)
Sets the AppLoader instance. |
| public void | setCacheManager(CacheManager cacheManager) |
| public void | setEventManager(EventManager eventManager) |
| public void | setExpressionEvaluator(ExpressionEvaluator expressionEvaluator) |
| public void | setFilterManager(EventFilterManager filterManager) |
| public void | setListenerManager(ListenerManager listenerManager) |
| private void | setLoading(boolean loading) |
| public void | setLogFactory(LogFactory logFactory) |
| public void | setMessageManager(MessageManager messageManager) |
| public void | setModuleManager(ModuleManager moduleManager) |
| public void |
setModuleName(string moduleName)
Sets the module name for this instance of the AppManager. |
| public void | setParent(AppManager parentAppManager) |
| public void | setPluginManager(PluginManager pluginManager) |
| public void | setPropertyManager(PropertyManager propertyManager) |
| public void | setRequestManager(RequestManager requestManager) |
| public void | setSubroutineManager(SubroutineManager subroutineManager) |
| public void | setUtils(Utils utils) |
| public void | setViewManager(ViewManager viewManager) |
| Method Detail |
|---|
| configure |
|---|
public void configure( )
Calls configure() on each of the manager instances.
Parameters:
Code:
<cffunction name="configure" access="public" returntype="void" hint="Calls configure() on each of the manager instances."> <cfif IsObject(getParent())> <cfset getRequestManager().cleanupCallbacks(getModuleName()) /> </cfif> <cfset getPropertyManager().configure() /> <cfset getCacheManager().configure() /> <cfset getRequestManager().configure() /> <cfset getPluginManager().configure() /> <cfset getListenerManager().configure() /> <cfset getMessageManager().configure() /> <cfset getFilterManager().configure() /> <cfset getSubroutineManager().configure() /> <cfset getEventManager().configure() /> <cfset getViewManager().configure() /> <cfif NOT IsObject(getParent())> <cfset getModuleManager().configure() /> </cfif> <cfset setLoading(false) /> </cffunction>
| getAppKey |
|---|
public any getAppKey( )
Parameters:
Code:
<cffunction name="getAppKey" access="public" type="string" output="false"> <cfreturn variables.appkey /> </cffunction>
| getAppLoader |
|---|
public AppLoader getAppLoader( )
Returns the AppLoader instance.
Parameters:
Code:
<cffunction name="getAppLoader" access="public" returntype="MachII.framework.AppLoader" output="false" hint="Returns the AppLoader instance."> <cfreturn variables.appLoader /> </cffunction>
| getCacheManager |
|---|
public CacheManager getCacheManager( )
Parameters:
Code:
<cffunction name="getCacheManager" access="public" returntype="MachII.framework.CacheManager" output="false"> <cfreturn variables.cacheManager /> </cffunction>
| getEventManager |
|---|
public EventManager getEventManager( )
Parameters:
Code:
<cffunction name="getEventManager" access="public" returntype="MachII.framework.EventManager" output="false"> <cfreturn variables.eventManager /> </cffunction>
| getExpressionEvaluator |
|---|
public ExpressionEvaluator getExpressionEvaluator( )
Parameters:
Code:
<cffunction name="getExpressionEvaluator" access="public" returntype="MachII.util.ExpressionEvaluator" output="false"> <cfreturn variables.expressionEvaluator /> </cffunction>
| getFilterManager |
|---|
public EventFilterManager getFilterManager( )
Parameters:
Code:
<cffunction name="getFilterManager" access="public" returntype="MachII.framework.EventFilterManager" output="false"> <cfreturn variables.filterManager /> </cffunction>
| getListenerManager |
|---|
public ListenerManager getListenerManager( )
Parameters:
Code:
<cffunction name="getListenerManager" access="public" returntype="MachII.framework.ListenerManager" output="false"> <cfreturn variables.listenerManager /> </cffunction>
| getLogFactory |
|---|
public LogFactory getLogFactory( )
Parameters:
Code:
<cffunction name="getLogFactory" access="public" returntype="MachII.logging.LogFactory" output="false"> <cfreturn variables.logFactory /> </cffunction>
| getMessageManager |
|---|
public MessageManager getMessageManager( )
Parameters:
Code:
<cffunction name="getMessageManager" access="public" returntype="MachII.framework.MessageManager" output="false"> <cfreturn variables.messageManager /> </cffunction>
| getModuleManager |
|---|
public ModuleManager getModuleManager( )
Parameters:
Code:
<cffunction name="getModuleManager" access="public" returntype="MachII.framework.ModuleManager" output="false"> <cfreturn variables.moduleManager /> </cffunction>
| getModuleName |
|---|
public string getModuleName( )
Gets the module name for this instance of the AppManager.
Parameters:
Code:
<cffunction name="getModuleName" access="public" returntype="string" output="false" hint="Gets the module name for this instance of the AppManager."> <cfreturn variables.moduleName /> </cffunction>
| getParent |
|---|
public any getParent( )
Parameters:
Code:
<cffunction name="getParent" access="public" returntype="any" output="false"> <cfreturn variables.parentAppManager /> </cffunction>
| getPluginManager |
|---|
public PluginManager getPluginManager( )
Parameters:
Code:
<cffunction name="getPluginManager" access="public" returntype="MachII.framework.PluginManager" output="false"> <cfreturn variables.pluginManager /> </cffunction>
| getPropertyManager |
|---|
public PropertyManager getPropertyManager( )
Parameters:
Code:
<cffunction name="getPropertyManager" access="public" returntype="MachII.framework.PropertyManager" output="false"> <cfreturn variables.propertyManager /> </cffunction>
| getRequestHandler |
|---|
public RequestHandler getRequestHandler( [boolean createNew="false"] )
Returns a new or cached instance of a RequestHandler.
Parameters:
| [boolean createNew="false"] |
Code:
<cffunction name="getRequestHandler" access="public" returntype="MachII.framework.RequestHandler" output="false" hint="Returns a new or cached instance of a RequestHandler."> <cfargument name="createNew" type="boolean" required="false" default="false" hint="Pass true to return a new instance of a RequestHandler." /> <cfreturn getRequestManager().getRequestHandler(arguments.createNew) /> </cffunction>
| getRequestManager |
|---|
public RequestManager getRequestManager( )
Parameters:
Code:
<cffunction name="getRequestManager" access="public" returntype="MachII.framework.RequestManager" output="false"> <cfreturn variables.requestManager /> </cffunction>
| getSubroutineManager |
|---|
public SubroutineManager getSubroutineManager( )
Parameters:
Code:
<cffunction name="getSubroutineManager" access="public" returntype="MachII.framework.SubroutineManager" output="false"> <cfreturn variables.subroutineManager /> </cffunction>
| getUtils |
|---|
public Utils getUtils( )
Parameters:
Code:
<cffunction name="getUtils" access="public" returntype="MachII.util.Utils" output="false"> <cfreturn variables.utils /> </cffunction>
| getViewManager |
|---|
public ViewManager getViewManager( )
Parameters:
Code:
<cffunction name="getViewManager" access="public" returntype="MachII.framework.ViewManager" output="false"> <cfreturn variables.viewManager /> </cffunction>
| init |
|---|
public AppManager init( )
Used by the framework for initialization. Do not override.
Parameters:
Code:
<cffunction name="init" access="public" returntype="AppManager" output="false" hint="Used by the framework for initialization. Do not override."> <cfreturn this /> </cffunction>
| isLoading |
|---|
public any isLoading( )
Parameters:
Code:
<cffunction name="isLoading" access="public" type="boolean" output="false"> <cfreturn variables.loading /> </cffunction>
| onSessionEnd |
|---|
public void onSessionEnd( struct sessionScope )
Handles on session end application event.
Parameters:
| struct sessionScope |
Code:
<cffunction name="onSessionEnd" access="public" returntype="void" output="false" hint="Handles on session end application event."> <cfargument name="sessionScope" type="struct" required="true" hint="The session scope is passed in since direct access is not allowed during the on session end application event." /> <cfset var modules = "" /> <cfset var key = "" /> <cfset getPluginManager().onSessionEnd(arguments.sessionScope) /> <cfif NOT IsObject(getParent())> <cfset modules = variables.moduleManager.getModules() /> <cfloop collection="#modules#" item="key"> <cfset modules[key].getModuleAppManager().onSessionEnd(arguments.sessionScope) /> </cfloop> </cfif> </cffunction>
| onSessionStart |
|---|
public void onSessionStart( )
Handles on session start application event.
Parameters:
Code:
<cffunction name="onSessionStart" access="public" returntype="void" output="false" hint="Handles on session start application event."> <cfset var modules = "" /> <cfset var key = "" /> <cfset getPluginManager().onSessionStart() /> <cfif NOT IsObject(getParent())> <cfset modules = variables.moduleManager.getModules() /> <cfloop collection="#modules#" item="key"> <cfset modules[key].getModuleAppManager().onSessionStart() /> </cfloop> </cfif> </cffunction>
| setAppKey |
|---|
public void setAppKey( string appkey )
Parameters:
| string appkey |
Code:
<cffunction name="setAppKey" access="public" returntype="void" output="false"> <cfargument name="appkey" type="string" required="true" /> <cfset variables.appkey = arguments.appkey /> </cffunction>
| setAppLoader |
|---|
public void setAppLoader( AppLoader appLoader )
Sets the AppLoader instance.
Parameters:
| AppLoader appLoader |
Code:
<cffunction name="setAppLoader" access="public" returntype="void" output="false" hint="Sets the AppLoader instance."> <cfargument name="appLoader" type="MachII.framework.AppLoader" required="true" /> <cfset variables.appLoader = arguments.appLoader /> </cffunction>
| setCacheManager |
|---|
public void setCacheManager( CacheManager cacheManager )
Parameters:
| CacheManager cacheManager |
Code:
<cffunction name="setCacheManager" access="public" returntype="void" output="false"> <cfargument name="cacheManager" type="MachII.framework.CacheManager" required="true" /> <cfset variables.cacheManager = arguments.cacheManager /> </cffunction>
| setEventManager |
|---|
public void setEventManager( EventManager eventManager )
Parameters:
| EventManager eventManager |
Code:
<cffunction name="setEventManager" access="public" returntype="void" output="false"> <cfargument name="eventManager" type="MachII.framework.EventManager" required="true" /> <cfset variables.eventManager = arguments.eventManager /> </cffunction>
| setExpressionEvaluator |
|---|
public void setExpressionEvaluator( ExpressionEvaluator expressionEvaluator )
Parameters:
| ExpressionEvaluator expressionEvaluator |
Code:
<cffunction name="setExpressionEvaluator" access="public" returntype="void" output="false"> <cfargument name="expressionEvaluator" type="MachII.util.ExpressionEvaluator" required="true" /> <cfset variables.expressionEvaluator = arguments.expressionEvaluator /> </cffunction>
| setFilterManager |
|---|
public void setFilterManager( EventFilterManager filterManager )
Parameters:
| EventFilterManager filterManager |
Code:
<cffunction name="setFilterManager" access="public" returntype="void" output="false"> <cfargument name="filterManager" type="MachII.framework.EventFilterManager" required="true" /> <cfset variables.filterManager = arguments.filterManager /> </cffunction>
| setListenerManager |
|---|
public void setListenerManager( ListenerManager listenerManager )
Parameters:
| ListenerManager listenerManager |
Code:
<cffunction name="setListenerManager" access="public" returntype="void" output="false"> <cfargument name="listenerManager" type="MachII.framework.ListenerManager" required="true" /> <cfset variables.listenerManager = arguments.listenerManager /> </cffunction>
| setLoading |
|---|
private void setLoading( boolean loading )
Parameters:
| boolean loading |
Code:
<cffunction name="setLoading" access="private" returntype="void" output="false"> <cfargument name="loading" type="boolean" required="true" /> <cfset variables.loading = arguments.loading /> </cffunction>
| setLogFactory |
|---|
public void setLogFactory( LogFactory logFactory )
Parameters:
| LogFactory logFactory |
Code:
<cffunction name="setLogFactory" access="public" returntype="void" output="false"> <cfargument name="logFactory" type="MachII.logging.LogFactory" required="true" /> <cfset variables.logFactory = arguments.logFactory /> </cffunction>
| setMessageManager |
|---|
public void setMessageManager( MessageManager messageManager )
Parameters:
| MessageManager messageManager |
Code:
<cffunction name="setMessageManager" access="public" returntype="void" output="false"> <cfargument name="messageManager" type="MachII.framework.MessageManager" required="true" /> <cfset variables.messageManager = arguments.messageManager /> </cffunction>
| setModuleManager |
|---|
public void setModuleManager( ModuleManager moduleManager )
Parameters:
| ModuleManager moduleManager |
Code:
<cffunction name="setModuleManager" access="public" returntype="void" output="false"> <cfargument name="moduleManager" type="MachII.framework.ModuleManager" required="true" /> <cfset variables.moduleManager = arguments.moduleManager /> </cffunction>
| setModuleName |
|---|
public void setModuleName( string moduleName )
Sets the module name for this instance of the AppManager.
Parameters:
| string moduleName |
Code:
<cffunction name="setModuleName" access="public" returntype="void" output="false" hint="Sets the module name for this instance of the AppManager."> <cfargument name="moduleName" type="string" required="true" /> <cfset variables.moduleName = arguments.moduleName /> </cffunction>
| setParent |
|---|
public void setParent( AppManager parentAppManager )
Parameters:
| AppManager parentAppManager |
Code:
<cffunction name="setParent" access="public" returntype="void" output="false"> <cfargument name="parentAppManager" type="MachII.framework.AppManager" required="true" /> <cfset variables.parentAppManager = arguments.parentAppManager /> </cffunction>
| setPluginManager |
|---|
public void setPluginManager( PluginManager pluginManager )
Parameters:
| PluginManager pluginManager |
Code:
<cffunction name="setPluginManager" access="public" returntype="void" output="false"> <cfargument name="pluginManager" type="MachII.framework.PluginManager" required="true" /> <cfset variables.pluginManager = arguments.pluginManager /> </cffunction>
| setPropertyManager |
|---|
public void setPropertyManager( PropertyManager propertyManager )
Parameters:
| PropertyManager propertyManager |
Code:
<cffunction name="setPropertyManager" access="public" returntype="void" output="false"> <cfargument name="propertyManager" type="MachII.framework.PropertyManager" required="true" /> <cfset variables.propertyManager = arguments.propertyManager /> </cffunction>
| setRequestManager |
|---|
public void setRequestManager( RequestManager requestManager )
Parameters:
| RequestManager requestManager |
Code:
<cffunction name="setRequestManager" access="public" returntype="void" output="false"> <cfargument name="requestManager" type="MachII.framework.RequestManager" required="true" /> <cfset variables.requestManager = arguments.requestManager /> </cffunction>
| setSubroutineManager |
|---|
public void setSubroutineManager( SubroutineManager subroutineManager )
Parameters:
| SubroutineManager subroutineManager |
Code:
<cffunction name="setSubroutineManager" access="public" returntype="void" output="false"> <cfargument name="subroutineManager" type="MachII.framework.SubroutineManager" required="true" /> <cfset variables.subroutineManager = arguments.subroutineManager /> </cffunction>
| setUtils |
|---|
public void setUtils( Utils utils )
Parameters:
| Utils utils |
Code:
<cffunction name="setUtils" access="public" returntype="void" output="false"> <cfargument name="utils" type="MachII.util.Utils" required="true" /> <cfset variables.utils = arguments.utils /> </cffunction>
| setViewManager |
|---|
public void setViewManager( ViewManager viewManager )
Parameters:
| ViewManager viewManager |
Code:
<cffunction name="setViewManager" access="public" returntype="void" output="false"> <cfargument name="viewManager" type="MachII.framework.ViewManager" required="true" /> <cfset variables.viewManager = arguments.viewManager /> </cffunction>