box.system.web.concurrent.Callable interface"> Callable
ColdBox Platform Version 3.1.0

coldbox.system.web
Class Controller

WEB-INF.cftags.component
        extended by coldbox.system.web.Controller
Direct Known Subclasses:
MockController

public class Controller
extends WEB-INF.cftags.component

This is the ColdBox Front Controller that dispatches events and manages your ColdBox application.


Constructor Summary
init(any appRootPath)
          Constructor
 
Method Summary
 any getAppHash()
          Get AppHash
 any getAppRootPath()
          Get this application's physical path
 any<boolean> getAspectsInitiated()
          Get AspectsInitiated
 any getCFMLEngine()
          Get the CFMLEngine utility(coldbox
 any<CacheFactory> getCacheBox()
          Get the application's CacheBox instance as coldbox
 any getColdboxInitiated()
          Get ColdboxInitiated: Boolean
 any<IColdboxApplicationCache> getColdboxOCM([any cacheName='default'])
          Get ColdboxOCM: coldbox
 any<struct> getColdboxSettings()
          I retrieve the ColdBox Settings Structure by Reference
 any<struct> getConfigSettings()
          I retrieve the Config Settings Structure by Reference
 any getDebuggerService()
          Get DebuggerService: coldbox
 any getExceptionService()
          Get ExceptionService: coldbox
 any getHandlerService()
          Get HandlerService: coldbox
 any getInterceptorService()
          Get interceptorService: coldbox
 any getLoaderService()
          Get LoaderService: coldbox
 any<LogBox> getLogBox()
          Get the application's LogBox instance
 any getModuleService()
          Get ModuleService: coldbox
 any getPlugin(any plugin, [any customPlugin='false'], [any newInstance='false'], [any module=''], [any init='true'])
          I am the Plugin cfc object factory
 any getPluginService()
          Get PluginService: coldbox
 any getRequestService()
          Get RequestService: coldbox
 any<coldbox.system.web.coldbox> getServices()
          Get all the registered services structure
 any getSetting([any name], [any FWSetting='false'])
          I get a setting from the FW Config structures
 any<struct> getSettingStructure([any FWSetting='false'], [any deepCopyFlag='false'])
          Compatability & Utility Method
private any<Util> getUtil()
          Create and return a util object
 any<LogBox> getWireBox()
          Get the application's LogBox instance
private any invoker(any target, any method, [any argCollection='[runtime expression]'], [any private='false'])
          Method Invoker
 void persistVariables([any persist=''], [any<struct> persistStruct])
          @deprecated DO NOT USE ANYMORE
private void pushTimers()
          Push timers into stack
 any runEvent([any event=''], [any<boolean> prepostExempt='false'], [any<boolean> private='false'], [any<boolean> default='false'], [any<struct> eventArguments='[runtime expression]'])
          I am an event handler runnable factory
private void sendRelocation(any url, [any<boolean> addtoken='false'], [any<numeric> statusCode='0'])
          Send a CF relocation via ColdBox
 void setAppHash(any appHash)
          Set AppHash
 void setAppRootPath(any appRootPath)
          Set this application's physical path
 void setAspectsInitiated(any aspectsInitiated)
          Set AspectsInitiated
 void setCacheBox(any<CacheFactory> cacheBox)
          Set the application's CacheBox instance
 void setColdboxInitiated(any coldboxInitiated)
          Set ColdboxInitiated
 void setColdboxOCM(any coldboxOCM)
          Set ColdboxOCM
 void setColdboxSettings(any<struct> coldboxSettings)
          Set ColdboxSettings
 void setConfigSettings(any<struct> configSettings)
          Set ConfigSettings
 void setDebuggerService(any debuggerService)
          Set DebuggerService
 void setHandlerService(any handlerService)
          Set HandlerService
 void setInterceptorService(any interceptorService)
          Set interceptorService
 void setLoaderService(any loaderService)
          Set LoaderService
 void setLog(any logger)
          Set the class logger object
 void setLogBox(any<LogBox> logBox)
          Set the logBox instance
 void setModuleService(any moduleService)
          Set ModuleService
 void setNextEvent([string event='[runtime expression]'], [string queryString=''], [boolean addToken='false'], [string persist=''], [struct persistStruct='[runtime expression]'], [boolean ssl], [string baseURL=''], [boolean postProcessExempt='false'], [string URL], [string URI], [numeric statusCode='0'])
          I Set the next event to run and relocate the browser to that event
 void setPluginService(Any pluginService)
          Set PluginService
 void setRequestService(any requestService)
          Set RequestService
 void setSetting([any name], [any value])
          I set a Global Coldbox setting variable in the configstruct, if it exists it will be overrided
 void setWireBox(any<Injector> wireBox)
          Set the WireBox instance
 any<boolean> settingExists(any name, [any FWSetting='false'])
          I Check if a value exists in the configstruct or the fwsettingsStruct
private any updateSSL(any inURL, any ssl)
          Update SSL or not on a request string
private any validateAction(any action='', [any inclusion=''], [any exclusion=''])
          Checks if an action can be executed according to inclusion/exclusion lists
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any appRootPath)
Constructor

Parameters:
appRootPath - The application root path
Method Detail

getAppHash

public any getAppHash()
Get AppHash


getAppRootPath

public any getAppRootPath()
Get this application's physical path


getAspectsInitiated

public any<boolean> getAspectsInitiated()
Get AspectsInitiated


getCFMLEngine

public any getCFMLEngine()
Get the CFMLEngine utility(coldbox.system.core.cf.CFMLEngine)


getCacheBox

public any<CacheFactory> getCacheBox()
Get the application's CacheBox instance as coldbox.system.cache.CacheFactory


getColdboxInitiated

public any getColdboxInitiated()
Get ColdboxInitiated: Boolean


getColdboxOCM

public any<IColdboxApplicationCache> getColdboxOCM([any cacheName='default'])
Get ColdboxOCM: coldbox.system.cache.CacheManager or new CacheBox providers coldbox.system.cache.IColdboxApplicationCache

Parameters:
cacheName - The cache name to retrieve

getColdboxSettings

public any<struct> getColdboxSettings()
I retrieve the ColdBox Settings Structure by Reference


getConfigSettings

public any<struct> getConfigSettings()
I retrieve the Config Settings Structure by Reference


getDebuggerService

public any getDebuggerService()
Get DebuggerService: coldbox.system.web.services.DebuggerService


getExceptionService

public any getExceptionService()
Get ExceptionService: coldbox.system.web.services.ExceptionService


getHandlerService

public any getHandlerService()
Get HandlerService: coldbox.system.web.services.HandlerService


getInterceptorService

public any getInterceptorService()
Get interceptorService: coldbox.system.web.services.InterceptorService


getLoaderService

public any getLoaderService()
Get LoaderService: coldbox.system.web.services.LoaderService


getLogBox

public any<LogBox> getLogBox()
Get the application's LogBox instance


getModuleService

public any getModuleService()
Get ModuleService: coldbox.system.web.services.ModuleService


getPlugin

Public any getPlugin(any plugin, [any customPlugin='false'], [any newInstance='false'], [any module=''], [any init='true'])
I am the Plugin cfc object factory.

Parameters:
plugin - The Plugin object's name to instantiate
customPlugin - Used internally to create custom plugins. Boolean
newInstance - If true, it will create and return a new plugin. No caching or persistance.
module - The module to retrieve the plugin from
init - Auto init() the plugin upon construction, Boolean

getPluginService

public any getPluginService()
Get PluginService: coldbox.system.web.services.PluginService


getRequestService

public any getRequestService()
Get RequestService: coldbox.system.web.services.RequestService


getServices

public any<coldbox.system.web.coldbox> getServices()
Get all the registered services structure


getSetting

public any getSetting([any name], [any FWSetting='false'])
I get a setting from the FW Config structures. Use the FWSetting boolean argument to retrieve from the fwSettingsStruct.

Parameters:
name - Name of the setting key to retrieve
FWSetting - Boolean Flag. If true, it will retrieve from the fwSettingsStruct else from the configStruct. Default is false.

getSettingStructure

public any<struct> getSettingStructure([any FWSetting='false'], [any deepCopyFlag='false'])
Compatability & Utility Method. By default I retrieve the Config Settings. You can change this by using the FWSetting flag.

Parameters:
FWSetting - Boolean Flag. If true, it will retrieve from the fwSettingsStruct else the configStruct. Default is false.
deepCopyFlag - Default is false. True, creates a deep copy of the structure.

getUtil

private any<Util> getUtil()
Create and return a util object


getWireBox

public any<LogBox> getWireBox()
Get the application's LogBox instance


invoker

private any invoker(any target, any method, [any argCollection='[runtime expression]'], [any private='false'])
Method Invoker

Parameters:
target -
method -
argCollection - The argument collection to pass
private - Private method or not? Boolean

persistVariables

public void persistVariables([any persist=''], [any<struct> persistStruct])
@deprecated DO NOT USE ANYMORE. Persist variables for flash redirections, it can use a structure of name-value pairs or keys from the request collection. Use the flash object instead, this method will auto-save all persistence automatically.

Parameters:
persist - What request collection keys to persist in the relocation. Keys must exist in the relocation
persistStruct - A structure of key-value pairs to persist.

pushTimers

private void pushTimers()
Push timers into stack


runEvent

Public any runEvent([any event=''], [any<boolean> prepostExempt='false'], [any<boolean> private='false'], [any<boolean> default='false'], [any<struct> eventArguments='[runtime expression]'])
I am an event handler runnable factory. If no event is passed in then it will run the default event from the config file.

Parameters:
event - The event to run as a string. If no current event is set, use the default event from the config.xml. This is a string
prepostExempt - If true, pre/post handlers will not be fired. Boolean
private - Execute a private event or not, default is false. Boolean
default - The flag that let's this service now if it is the default set event running or not. USED BY THE FRAMEWORK ONLY. Boolean
eventArguments - A collection of arguments to passthrough to the calling event handler method. Struct

sendRelocation

private void sendRelocation(any url, [any<boolean> addtoken='false'], [any<numeric> statusCode='0'])
Send a CF relocation via ColdBox

Parameters:
url - The URL to relocate to
addtoken - Add the CF tokens or not
statusCode - The status code to use

setAppHash

public void setAppHash(any appHash)
Set AppHash

Parameters:
appHash

setAppRootPath

public void setAppRootPath(any appRootPath)
Set this application's physical path.

Parameters:
appRootPath

setAspectsInitiated

public void setAspectsInitiated(any aspectsInitiated)
Set AspectsInitiated

Parameters:
aspectsInitiated

setCacheBox

public void setCacheBox(any<CacheFactory> cacheBox)
Set the application's CacheBox instance

Parameters:
cacheBox - As coldbox.system.cache.CacheFactory

setColdboxInitiated

public void setColdboxInitiated(any coldboxInitiated)
Set ColdboxInitiated

Parameters:
coldboxInitiated

setColdboxOCM

public void setColdboxOCM(any coldboxOCM)
Set ColdboxOCM

Parameters:
coldboxOCM - coldbox.system.cache.CacheManager

setColdboxSettings

public void setColdboxSettings(any<struct> coldboxSettings)
Set ColdboxSettings

Parameters:
coldboxSettings

setConfigSettings

public void setConfigSettings(any<struct> configSettings)
Set ConfigSettings

Parameters:
configSettings

setDebuggerService

public void setDebuggerService(any debuggerService)
Set DebuggerService

Parameters:
debuggerService

setHandlerService

public void setHandlerService(any handlerService)
Set HandlerService

Parameters:
handlerService

setInterceptorService

public void setInterceptorService(any interceptorService)
Set interceptorService

Parameters:
interceptorService

setLoaderService

public void setLoaderService(any loaderService)
Set LoaderService

Parameters:
loaderService

setLog

public void setLog(any logger)
Set the class logger object

Parameters:
logger

setLogBox

public void setLogBox(any<LogBox> logBox)
Set the logBox instance

Parameters:
logBox - The logBox instance

setModuleService

public void setModuleService(any moduleService)
Set ModuleService

Parameters:
moduleService

setNextEvent

public void setNextEvent([string event='[runtime expression]'], [string queryString=''], [boolean addToken='false'], [string persist=''], [struct persistStruct='[runtime expression]'], [boolean ssl], [string baseURL=''], [boolean postProcessExempt='false'], [string URL], [string URI], [numeric statusCode='0'])
I Set the next event to run and relocate the browser to that event. If you are in SES mode, this method will use routing instead. You can also use this method to relocate to an absolute URL or a relative URI

Parameters:
event - The name of the event to run, if not passed, then it will use the default event found in your configuration file.
queryString - The query string to append, if needed. If in SES mode it will be translated to convention name value pairs
addToken - Wether to add the tokens or not. Default is false
persist - What request collection keys to persist in flash ram
persistStruct - A structure key-value pairs to persist in flash ram.
ssl - Whether to relocate in SSL or not. You need to explicitly say TRUE or FALSE if going out from SSL. If none passed, we look at the even's SES base URL (if in SES mode)
baseURL - Use this baseURL instead of the index.cfm that is used by default. You can use this for ssl or any full base url you would like to use. Ex: https://mysite.com/index.cfm
postProcessExempt - Do not fire the postProcess interceptors
URL - The full URL you would like to relocate to instead of an event: ex: URL='http://www.google.com'
URI - The relative URI you would like to relocate to instead of an event: ex: URI='/mypath/awesome/here'
statusCode - The status code to use in the relocation

setPluginService

public void setPluginService(Any pluginService)
Set PluginService

Parameters:
pluginService

setRequestService

public void setRequestService(any requestService)
Set RequestService

Parameters:
requestService

setSetting

public void setSetting([any name], [any value])
I set a Global Coldbox setting variable in the configstruct, if it exists it will be overrided. This only sets in the ConfigStruct

Parameters:
name - The name of the setting
value - The value of the setting (Can be simple or complex)

setWireBox

public void setWireBox(any<Injector> wireBox)
Set the WireBox instance

Parameters:
wireBox - The WireBox instance

settingExists

public any<boolean> settingExists(any name, [any FWSetting='false'])
I Check if a value exists in the configstruct or the fwsettingsStruct.

Parameters:
name - Name of the setting to find.
FWSetting - Boolean Flag. If true, it will retrieve from the fwSettingsStruct else from the configStruct. Default is false.

updateSSL

private any updateSSL(any inURL, any ssl)
Update SSL or not on a request string

Parameters:
inURL
ssl

validateAction

private any validateAction(any action='', [any inclusion=''], [any exclusion=''])
Checks if an action can be executed according to inclusion/exclusion lists. Boolean

Parameters:
action - The action to check
inclusion - inclusion list
exclusion - exclusion list

ColdBox Platform Version 3.1.0