Reserved Words & Methods Guide

Introduction

This guide will show you which methods and variables are reserved and cannot be overridden when you are developing ColdBox applications or you can override them but at your own risk. Therefore, you will inherit functionality in all your event handlers, interceptors, and plugins. Some that can be overridden, others cannot, and if you do, quirky and nasty things may happen. We will start off by seeing the reserved words & methods for all plugins, handlers and interceptors in a layer called frameworkSuperType.

Framework Super Type Reserved Words & Methods

The framework super type encompasses interceptors, plugins and handlers.

Reserved Words

controller The ColdBox Controller
instance Internal private scope
instance.__hash An internal hash id for the event handler.

Reserved Facade/Concrete Methods

abort cfabort facade
announceInterception A way to announce custom interceptions
dump cfdump facade
getColdBoxOCM Get a reference to the ColdBox Object Cache Manager
getcontroller Get a reference to the ColdBox controller
getDatasource Get a named datasource bean
getDebugMode Get the current debug mode for the user
getfwlocale If using i18N, then retrieves the current locale
getHash Get the hash
getInstance Get the instance scope
getInterceptor Get an interceptor
getMailSettings Get a mail settings bean
getModel Get a model object
getMyPlugin Get a custom plugin
getPlugin Get a core or custom plugin
getResource If using i18N, then retrieves a resource from a resource bundle
getSetting Get a setting
getSettingsBean Geta a config settings bean
getSettingStructure Get the ColdBox or Application Settings Structure
htmlhead Append data to the html head
include cfinclude facade
includeUDF A mixin injection method, so you can inject your handler with your own methods at runtime.
locateDirectoryPath Locate a directory path within an application
locateFilePath Locate a file path within an application
persistVariables The ability to flash persist variables
populateModel Populate a model object
relocate Facade to cflocation
renderExternalView Render an external view
renderView Render a view
runEvent Execute a ColdBox event
setController Set the coldbox controller
setDebugMode Set the debug mode for the user
setNextEvent Relocate to another event
setNextRoute Relocate to another route
setSetting Set a setting
settingExists Check if a setting exists
throw cfthrow facade

Event Handler Reserved Words & Methods

The event handler is a workhorse object in your application. It concentrates all its energies on directing requests to business tiers and preparing views and what not. For more information on event handlers, please see the Event Handlers Guide.

Reserved Words

  • All words inherited by the super type, plus the following:
this.EVENT_CACHE_SUFFIX The event cache suffix to use when using event caching.
this.PREHANDLER_EXCEPT The exception list of actions for this implicit event
this.PREHANDLER_ONLY The execute only list of actions for this implicit event
this.POSTHANDLER_EXCEPT The exception list of actions for this implicit event
this.POSTHANDLER_ONLY The execute only list of actions for this implicit event

Reserved Facade/Concrete Methods

  • All methods from the super type, plus the following:
_privateInvoker Execute private events

Plugin Reserved Words & Methods

ColdBox plugins are the way that you can extend the framework to do more application specific tasks or aspects around an application. For more information on plugins, please see the Plugins Guide.

Reserved Words

  • All words inherited by the super type, plus the following:
instance.pluginName The name of the plugin
instance.pluginVersion The version of the plugin
instance.pluginDescription The description of the plugin
instance.pluginPath The current template path of the plugin location

Reserved Facade/Concrete Methods

  • All methods from the super type, plus the following:
set/getPluginName Set/Get the plugin name
set/getPluginVersion Set/Get the plugin Version
set/getPluginDescription Set/Get the plugin description
getPluginPath Get the current plugin path

Interceptor Reserved Words & Methods

ColdBox interceptors are the way that you can extend the framework to do more application specific tasks or aspects around the application or framework at specific interception points. For more information on interceptors, please see the Interceptors Guide.

Reserved Words

  • All words inherited by the super type, plus the following:
instance.properties The structure of properties

Reserved Facade/Concrete Methods

  • All methods from the super type, plus the following:
Configure The method to use to configure the interceptor
getProperties Get the properties structure reference
setProperties Override the properties structure
getProperty get a single property
setProperty set a single property
propertyExists Check if a property exists
unregister Unregister an interceptor from a state
clearBuffer Clear the output buffer
appendToBuffer Append content to output buffer
getBufferString Get the current output buffer string
getBufferObject Get the current output buffer object

Conclusion

As you can see from the listing above, there are several methods and variables that you inherit as an event handler or a plugin or interceptor. There is no reason why you should not override them, if you know what you are doing and would like to actually decorate the internal methods via the event handler or a decorator UDF injection. So the possibilities of making ColdBox adapt to your needs are ENDLESS!!