| Package: MachII.framework |
| Holds a Module. |
| Method Summary | |
|---|---|
| public Module |
init(AppManager appManager, string moduleName, string file, any overrideXml)
Used by the framework for initialization. Do not override. |
| public void | configure(string configDtdPath, [boolean validateXml="false"]) |
| public AppManager |
getAppManager()
Sets the AppManager instance this ModuleManager belongs to. |
| public any | getDtdPath() |
| public any |
getFile()
Gets the file to use when setting up the module's AppManager |
| public AppManager |
getModuleAppManager()
Sets the ModuLeAppManager instance this ModuleManager belongs to. |
| public any |
getModuleName()
Gets the module name |
| public any |
getOverrideXml()
Gets the override Xml for this module. |
| public void | reloadModuleConfig([boolean validateXml="false"]) |
| public void |
setAppManager(AppManager appManager)
Returns the AppManager instance this Module belongs to. |
| public void | setDtdPath(string dtdPath) |
| public void |
setFile(string file)
Sets the path to the module Mach II config file |
| public void |
setModuleAppManager(AppManager moduleAppManager)
Returns the ModuleAppManager instance this ModuleManager belongs to. |
| public void |
setModuleName(string moduleName)
Sets the name of the module |
| public void |
setOverrideXml(any overrideXml)
Sets the override Xml for this module. |
| public boolean | shouldReloadConfig() |
| Method Detail |
|---|
| configure |
|---|
public void configure( string configDtdPath, [boolean validateXml="false"] )
Parameters:
| string configDtdPath |
| [boolean validateXml="false"] |
Code:
<cffunction name="configure" access="public" returntype="void" output="false">
<cfargument name="configDtdPath" type="string" required="true"
hint="The full path to the configuration DTD file." />
<cfargument name="validateXml" type="boolean" required="false" default="false"
hint="Should the XML be validated before parsing." />
<cfset var appLoader = CreateObject("component", "MachII.framework.AppLoader").init(
getFile(), arguments.configDtdPath, getAppManager().getAppKey(), arguments.validateXML, getAppManager(), getOverrideXml(), getModuleName()) />
<cfset var moduleAppManager = appLoader.getAppManager() />
<cfset setDtdPath(arguments.configDtdPath) />
<cfset moduleAppManager.setAppLoader(appLoader) />
<cfset setModuleAppManager(moduleAppManager) />
</cffunction>
| getAppManager |
|---|
public AppManager getAppManager( )
Sets the AppManager instance this ModuleManager belongs to.
Parameters:
Code:
<cffunction name="getAppManager" access="public" returntype="MachII.framework.AppManager" output="false" hint="Sets the AppManager instance this ModuleManager belongs to."> <cfreturn variables.appManager /> </cffunction>
| getDtdPath |
|---|
public any getDtdPath( )
Parameters:
Code:
<cffunction name="getDtdPath" access="public" type="string" output="false"> <cfreturn variables.dtdPath /> </cffunction>
| getFile |
|---|
public any getFile( )
Gets the file to use when setting up the module's AppManager
Parameters:
Code:
<cffunction name="getFile" access="public" type="string" output="false" hint="Gets the file to use when setting up the module's AppManager"> <cfreturn variables.file /> </cffunction>
| getModuleAppManager |
|---|
public AppManager getModuleAppManager( )
Sets the ModuLeAppManager instance this ModuleManager belongs to.
Parameters:
Code:
<cffunction name="getModuleAppManager" access="public" returntype="MachII.framework.AppManager" output="false" hint="Sets the ModuLeAppManager instance this ModuleManager belongs to."> <cfreturn variables.moduleAppManager /> </cffunction>
| getModuleName |
|---|
public any getModuleName( )
Gets the module name
Parameters:
Code:
<cffunction name="getModuleName" access="public" type="string" output="false" hint="Gets the module name"> <cfreturn variables.moduleName /> </cffunction>
| getOverrideXml |
|---|
public any getOverrideXml( )
Gets the override Xml for this module.
Parameters:
Code:
<cffunction name="getOverrideXml" access="public" type="any" output="false" hint="Gets the override Xml for this module."> <cfreturn variables.overrideXml /> </cffunction>
| init |
|---|
public Module init( AppManager appManager, string moduleName, string file, any overrideXml )
Used by the framework for initialization. Do not override.
Parameters:
| AppManager appManager |
| string moduleName |
| string file |
| any overrideXml |
Code:
<cffunction name="init" access="public" returntype="Module" output="false" hint="Used by the framework for initialization. Do not override."> <cfargument name="appManager" type="MachII.framework.AppManager" required="true" /> <cfargument name="moduleName" type="string" required="true" /> <cfargument name="file" type="string" required="true" /> <cfargument name="overrideXml" type="any" required="true" /> <cfset setFile(arguments.file) /> <cfset setModuleName(arguments.moduleName) /> <cfset setAppManager(arguments.appManager) /> <cfset setOverrideXml(arguments.overrideXml) /> <cfreturn this /> </cffunction>
| reloadModuleConfig |
|---|
public void reloadModuleConfig( [boolean validateXml="false"] )
Parameters:
| [boolean validateXml="false"] |
Code:
<cffunction name="reloadModuleConfig" access="public" returntype="void" output="false">
<cfargument name="validateXml" type="boolean" required="false" default="false"
hint="Should the XML be validated before parsing." />
<cfset var appLoader = CreateObject("component", "MachII.framework.AppLoader").init(
getFile(), getDtdPath(), getAppManager().getAppKey(), arguments.validateXML, getAppManager(), getOverrideXml(), getModuleName()) />
<cfset var moduleAppManager = appLoader.getAppManager() />
<cfset moduleAppManager.setAppLoader(appLoader) />
<cfset setModuleAppManager(moduleAppManager) />
</cffunction>
| setAppManager |
|---|
public void setAppManager( AppManager appManager )
Returns the AppManager instance this Module belongs to.
Parameters:
| AppManager appManager |
Code:
<cffunction name="setAppManager" access="public" returntype="void" output="false" hint="Returns the AppManager instance this Module belongs to."> <cfargument name="appManager" type="MachII.framework.AppManager" required="true" /> <cfset variables.appManager = arguments.appManager /> </cffunction>
| setDtdPath |
|---|
public void setDtdPath( string dtdPath )
Parameters:
| string dtdPath |
Code:
<cffunction name="setDtdPath" access="public" returntype="void" output="false"> <cfargument name="dtdPath" type="string" required="true" /> <cfset variables.dtdPath = arguments.dtdPath /> </cffunction>
| setFile |
|---|
public void setFile( string file )
Sets the path to the module Mach II config file
Parameters:
| string file |
Code:
<cffunction name="setFile" access="public" returntype="void" output="false" hint="Sets the path to the module Mach II config file"> <cfargument name="file" type="string" required="true" /> <cfset variables.file = arguments.file /> </cffunction>
| setModuleAppManager |
|---|
public void setModuleAppManager( AppManager moduleAppManager )
Returns the ModuleAppManager instance this ModuleManager belongs to.
Parameters:
| AppManager moduleAppManager |
Code:
<cffunction name="setModuleAppManager" access="public" returntype="void" output="false" hint="Returns the ModuleAppManager instance this ModuleManager belongs to."> <cfargument name="moduleAppManager" type="MachII.framework.AppManager" required="true" /> <cfset variables.moduleAppManager = arguments.moduleAppManager /> </cffunction>
| setModuleName |
|---|
public void setModuleName( string moduleName )
Sets the name of the module
Parameters:
| string moduleName |
Code:
<cffunction name="setModuleName" access="public" returntype="void" output="false" hint="Sets the name of the module"> <cfargument name="moduleName" type="string" required="true" /> <cfset variables.moduleName = arguments.moduleName /> </cffunction>
| setOverrideXml |
|---|
public void setOverrideXml( any overrideXml )
Sets the override Xml for this module.
Parameters:
| any overrideXml |
Code:
<cffunction name="setOverrideXml" access="public" returntype="void" output="false" hint="Sets the override Xml for this module."> <cfargument name="overrideXml" type="any" required="true" /> <cfset variables.overrideXml = arguments.overrideXml /> </cffunction>
| shouldReloadConfig |
|---|
public boolean shouldReloadConfig( )
Parameters:
Code:
<cffunction name="shouldReloadConfig" access="public" returntype="boolean" output="false"> <cfreturn getModuleAppManager().getAppLoader().shouldReloadConfig() /> </cffunction>