Controller Services
DebuggerService |
ModulesService |
InterceptorService |
ExceptionService |
PluginService |
HandlerService |
RequestService |
Security Interceptor Property
useRegex |
[boolean=true] |
rulesSource |
[string=xml, db, ioc, ocm, model] |
queryChecks |
[boolean=true] |
preEventSecurity |
[boolean=false] |
validator |
[classpath] |
validatorIOC |
[bean name] |
validatorModel |
[model name] |
SES Interceptor Properties
configFile |
relative or absolute routes file defaults to (config/Routes.cfm) |
Coldbox Interception Points
afterConfigurationLoad()
afterAspectsLoad()
afterPluginCreation() * pluginPath, custom, oPlugin
afterHandlerCreation() * handlerPath, oHandler
afterModelCreation() * modelName, oModel
applicationStart()
applicationEnd()
onInvalidEvent() invalidEvent, override, ehBean
onException() * exception
onReinit()
preProcess()
postProcess()
preEvent() processedEvent
preLayout()
preProxyResults()
preRender() * renderedContent
postEvent() * processedEvent
postRender()
preViewRender() View, cache, cacheTimeout, cacheLastAccessTimeout, cacheSuffix, module
postViewRender() View, cache, cacheTimeout, cacheLastAccessTimeout, cacheSuffix, module, renderedView
sessionStart()
sessionEnd() |
Sample Plugin
component{
function init(){
setPluginName(“MyPlugin”);
setPluginVersion(“1.0”);
setPluginDescription(“MyPlugin”);
setPluginAuthor(“YourName”);
setPluginAuthorURL(“www.my.com”);
}
}
|
Sample Interceptor
component{
function configure(){
//configure properties here
}
//method = interception point
function preProcess(interceptData,event){
}
}
|
Framework Supertype
$abort(), $dump(), $htmlhead(),
$include(), $throw(), $rethrow()
addAsset(assetList)
announceInterception(state, [interceptData])
getColdBoxOCM([cachename])
getController()
getDatasource(alias)
getDebugMode()
getfwLocale()
getInterceptor(name)
getModel(name, [dsl], [initArguments])
getMailSettings()
getMailService()
getNewMail()
getMyPlugin(plugin, [newinstance])
getPlugin(plugin, [customPlugin], [newInstance])
getResource(resource, [default], [locale])
getSetting(name, [fwSetting])
getSettingsBean()
getSettingStructure([fwSetting], [DeepCopyFlag])
includeUDF(udfLibrary)
persistVariables(persist, [persistStruct])
populateModel(model, scope, trustedSetter, include, exclude)
renderExternalView(view)
renderLayout(layout)
renderView([view], [cache], [Timeout], [LastAccessTimeout])
runEvent(event, [prepostExempt], [private])
setDebugMode(mode)
setNextEvent(event, [queryString], [addToken], [persist], [persistStruct], [ssl], [baseURL], [postProcessExempt], [URL], [URI], [statusCode])
setSetting(name, value)
setFWLocale(locale)
settingExists(name, [fwSetting]) |
Interceptor Methods
configure()
getProperties(properties)
setProperties()
getProperty(name)
setProperty(name, value)
propertyExists(name)
unregister(state)
clearBuffer()
appendToBuffer(string)
getBufferString()
getBufferObject() |
|
|
Render Datatypes
json, jsonp, jsont, xml, pdf, wddx, text, plain, html |
Renderer Plugin
renderView(view, cache, cacheTimeout, cacheLastAccessTimeout, cacheSuffix, module, args, collection, collectionAs)
renderLayout(layout, view, module, args) |
Cachebox Interception Points
afterCacheElementInsert() Cache, cacheObject, cacheObjectKey, cacheObjectTimeout, cacheObjectLastAccessTimeout
afterCacheElementRemoved() Cache, cacheObjectKey
afterCacheElementExpired() Cache, cacheObjectKey
afterCacheElementUpdated() Cache, cacheNewObject, cacheOldObject
afterCacheClearAll() Cache
afterCacheRegistration() Cache
afterCacheRemoval() Cache (name)
beforeCacheRemoval() Cache
beforeCacheReplacement() oldCache, newCache
afterCacheFactoryConfiguration() cacheFactory
beforeCacheFactoryShutdown() cacheFactory
afterCacheFactoryShutdown() cacheFactory
beforeCacheShutdown() cache
afterCacheShutdown() Cache |
Request Context Common Methods
buildLink(linkto, [translate], [ssl], [baseURL], [queryString])
clearCollection()
collectionAppend(collection, [overwrite])
getCollection([DeepCopyFlag], [private])
getCurrentAction()
getCurrentEvent()
getCurrentHandler()
getCurrentLayout()
getCurrentModule()
getCurrentRoute()
getCurrentRoutedURL()
getCurrentView()
getDefaultLayout()
getDefaultView()
getEventName()
getHTTPHeader(header, [default])
getHTTPMethod()
getModuleRoot()
getSESBaseURL()
setSESBaseURL()
getSize()
getTrimValue(name, [default], [private])
getValue(name, [default], [private])
isAjax()
isProxyRequest()
isSES()
isSSL()
noExecution()
noRender([remove])
overrideEvent(event)
paramValue(name, value, [private])
renderData( type, data, [contentType], [encoding], [statusCode], [statusText], [jsonCase], [jsonQueryFormat], [jsonAsText], [xmlColumnList], [xmlUseCDATA], xmlListDelimiter], [xmlRootName])
removeValue(name, [private])
setHTTPHeader(statusCode, statusText, name, value, charset)
setLayout(name)
setValue(name, value, [private])
setView(name, [noLayout], [cache], [cacheTimeout], [cacheLastAccessTimeout], [cacheSuffix], [layout])
valueExists(name, [private])
showDebugPanel(boolean) |
Received as event
to event handlers
Controller Common Methods
getAppRootPath()
getCacheBox()
getLogBox()
getWireBox()
getColdboxOCM([name])
getColdboxSettings()
getConfigSettings()
getPlugin(plugin, [customPlugin], [newInstance])
get{ServiceName}()
getSettingStructure([fwSetting], [DeepCopyFlag])
getSetting(name, [fwSetting])
persistVariables(persist, [persistStruct])
runEvent(event, [prepostExempt], [private])
settingExists(name, [fwSetting])
setSetting(name, value)
setNextEvent(event, [queryString], [addToken], [persist], [persistStruct], [ssl], [baseURL], [postProcessExempt], [URL], [URI], [statusCode]) |
Sample Handler Code
component{
any function index(event,rc,prc){
return “Hello”;
}
}
|
|
|
URL Actions (index.cfm?)
fwreinit=1 or {reinitPassword} |
debugmode=true |
debugpass={DebugPass} |
fwcache=anything |
ColdBox Config
Coldbox (struct) |
Settings (struct) |
Conventions (struct) |
Environments (struct) |
Ioc (struct) |
WireBox (struct) |
Debugger (struct) |
mailSettings (struct) |
I18n (struct) |
Webservices (struct) |
Datasources (struct) |
LayoutSettings (struct) |
Layouts (array of structs) |
Cachebox (struct) |
Logbox (struct) |
InterceptorSettings (struct) |
Interceptors (array of structs) |
Modules (struct) |
Flash (struct) |
ORM (struct) |
Validation (struct) |
Config Injected Vars
AppMapping |
Controller |
LogBoxConfig |
SES Route Methods
addRoute(*) |
addModuleRoutes(pattern, module) |
setBaseURL() |
setUniqueURLS() |
setAutoReload() |
setExtensionDetection() |
setValidExtensions() |
setThrowOnInvalidExtension() |
setLooseMatching() |
addRoute()
[pattern] |
[handler] |
[action] |
[matchVariables] |
[view] |
[viewNoLayout] |
[valuePairTranslation] |
[constraints] |
[module] |
SES Routes
Default Pattern :handler/:action? |
:var ANY Placeholder |
:var-numeric Numeric |
:var-alpha Alpha |
:var{X} Limit by X |
? = optional placeholder |
:regex() Limit by regex |
Valid Extensions: xml, json, jsont, html, htm, rss |
Folder Conventions
Application.cfc |
index.cfm (empty) |
config |
Coldbox.cfc |
Routes.cfm |
handlers |
model |
modules |
layouts |
views |
Implicit Handler Events
preHandler,pre{Action} |
postHandler,post{Action} |
aroundHandler |
around{Action} |
onMissingAction |
Handler Properties
This scope properties |
event_cache_suffix |
preHandler_only |
preHandler_except |
postHandler_only |
postHandler_except |
allowedMethods |
Core Plugins
AntiSamy |
Logger |
ApplicationStorage |
MailService |
ClientStorage |
MessageBox |
ClusterStorage |
ORMService |
CookieStorage |
QueryHelper |
DateUtils |
Renderer |
FeedGenerator |
ResourceBundle |
FeedReader |
SessionStorage |
FileUtils |
Timer |
i18n |
Utilities |
IOC |
Validator |
JavaLoader |
Webservices |
JSON |
XMLConverter |
JVMUtils |
Zip |
|