box.system.concurrent.Callable interface"> Callable
ColdBox Platform Version 2.6.4

coldbox.system
Class FrameworkSupertype

WEB-INF.cftags.component
        extended by coldbox.system.FrameworkSupertype
Direct Known Subclasses:
EventHandler , Interceptor , Plugin

public class FrameworkSupertype
extends WEB-INF.cftags.component

This is the layer supertype cfc for all ColdBox related objects.


Method Summary
 void $abort()
          Facade for cfabort
 void $dump(any var, [boolean isAbort='false'])
          Facade for cfmx dump
 void $htmlhead(string content)
          Facade to cfhtmlhead
 void $include([string template])
          Facade for cfinclude
 void $rethrow(any throwObject)
          Rethrow facade
 any $throw(string message, [string detail=''], [string type='Framework'])
          Facade for cfthrow
 any addAsset(any asset)
          Add a js/css asset(s) to the html head section
 void announceInterception(string state, [struct interceptData='[runtime expression]'])
          Announce an interception to the system
 any getColdboxOCM()
          Get ColdboxOCM: coldbox
 any getController()
          Get controller: coldbox
 DatasourceBean getDatasource([string alias])
          I will return to you a datasourceBean according to the alias of the datasource you wish to get from the configstruct
 boolean getDebugMode()
          Facade to get your current debug mode
 string getHash()
          Get the instance's unique ID
 any getInstance()
          Get the instance of this object
 any getInterceptor([string interceptorName], [boolean deepSearch='false'])
          Get an interceptor
 MailSettingsBean getMailSettings()
          I will return to you a mailsettingsBean modeled after your mail settings in your config file
 any getModel(string name, [boolean useSetterInjection], [string onDICompleteUDF], [boolean debugMode], [string stopRecursion])
          Create or retrieve model objects by convention
 any getModuleSettings(string module)
          Get a module's setting structure if it exists
 any getMyPlugin(any plugin, [boolean newInstance='false'], [any module=''], [boolean init='true'])
          Facade
 any getPlugin([any plugin], [boolean customPlugin='false'], [boolean newInstance='false'], [any module=''], [boolean init='true'])
          Facade
 any getResource(any resource, [any default], [any locale])
          Facade to i18n
 any getSetting(string name, [boolean FWSetting='false'])
          Facade
 struct getSettingStructure([boolean FWSetting='false'], [boolean DeepCopyFlag='false'])
          Facade
 ConfigBean getSettingsBean([boolean FWSettings='false'])
          Returns a configBean with all the configuration structure
 any getfwLocale()
          Get the user's currently set locale or default locale
 void includeUDF(string udflibrary)
          Injects a UDF Library (*
 string locateDirectoryPath(string pathToCheck)
          Locate the real path location of a directory in a coldbox application
 string locateFilePath(string pathToCheck)
          Locate the real path location of a file in a coldbox application
 void persistVariables([string persist=''], [struct persistStruct])
          Persist variables for flash redirections
 Any populateModel(any model, [string scope=''], [boolean trustedSetter='false'], [string include=''], [string exclude=''])
          Populate a named or instantiated model (java/cfc) from the request collection items
 void relocate(string url, [boolean addtoken='false'], [boolean postProcessExempt='false'])
          This method will be deprecated, please use setNextEvent() instead
 Any renderExternalView(string view, [boolean cache='false'], [string cacheTimeout=''], [string cacheLastAccessTimeout=''], [string cacheSuffix=''])
          Facade to plugins' render external view
 Any renderView(string view, [boolean cache='false'], [string cacheTimeout=''], [string cacheLastAccessTimeout=''], [string cacheSuffix=''], [string module=''])
          Facade to plugin's render view
 any runEvent([string event=''], [boolean prepostExempt='false'], [boolean private='false'])
          Facade to controller's runEvent() method
 void setDebugMode(boolean mode)
          Facade to set your debug mode
 void setNextEvent([string event], [string queryString], [boolean addToken], [string persist], [struct persistStruct], [boolean ssl], [string baseURL], [boolean postProcessExempt], [string URL], [string URI], [numeric statusCode])
          Facade
 void setNextRoute(string route, [string persist=''], [struct persistStruct], [boolean addToken='false'], [boolean ssl='false'])
          This method is now deprecated, please use setNextEvent()
 void setSetting(string name, any value)
          Facade
 any setfwLocale([string locale], [boolean dontloadRBFlag])
          Set the default locale to use in the framework for a specific user
 boolean settingExists(string name, [boolean FWSetting='false'])
          Facade
 
Methods inherited from class WEB-INF.cftags.component
 

Method Detail

$abort

public void $abort()
Facade for cfabort


$dump

public void $dump(any var, [boolean isAbort='false'])
Facade for cfmx dump

Parameters:
var
isAbort - Abort also

$htmlhead

public void $htmlhead(string content)
Facade to cfhtmlhead

Parameters:
content - The content to send to the head

$include

public void $include([string template])
Facade for cfinclude

Parameters:
template

$rethrow

public void $rethrow(any throwObject)
Rethrow facade

Parameters:
throwObject - The cfcatch object

$throw

public any $throw(string message, [string detail=''], [string type='Framework'])
Facade for cfthrow

Parameters:
message
detail
type

addAsset

public any addAsset(any asset)
Add a js/css asset(s) to the html head section. You can also pass in a list of assets.

Parameters:
asset - The asset to load, only js or css files. This can also be a comma delimmited list.

announceInterception

public void announceInterception(string state, [struct interceptData='[runtime expression]'])
Announce an interception to the system.

Parameters:
state - The interception state to execute
interceptData - A data structure used to pass intercepted information.

getColdboxOCM

public any getColdboxOCM()
Get ColdboxOCM: coldbox.system.cache.CacheManager


getController

public any getController()
Get controller: coldbox.system.web.Controller


getDatasource

public DatasourceBean getDatasource([string alias])
I will return to you a datasourceBean according to the alias of the datasource you wish to get from the configstruct

Parameters:
alias - The alias of the datasource to get from the configstruct (alias property in the config file)

getDebugMode

public boolean getDebugMode()
Facade to get your current debug mode


getHash

public string getHash()
Get the instance's unique ID


getInstance

public any getInstance()
Get the instance of this object


getInterceptor

public any getInterceptor([string interceptorName], [boolean deepSearch='false'])
Get an interceptor

Parameters:
interceptorName - The name of the interceptor to search for
deepSearch - By default we search the cache for the interceptor reference. If true, we search all the registered interceptor states for a match.

getMailSettings

public MailSettingsBean getMailSettings()
I will return to you a mailsettingsBean modeled after your mail settings in your config file.


getModel

public any getModel(string name, [boolean useSetterInjection], [string onDICompleteUDF], [boolean debugMode], [string stopRecursion])
Create or retrieve model objects by convention

Parameters:
name - The name of the model to retrieve
useSetterInjection - Whether to use setter injection alongside the annotations property injection. cfproperty injection takes precedence.
onDICompleteUDF - After Dependencies are injected, this method will look for this UDF and call it if it exists. The default value is onDIComplete
debugMode - Debugging Mode or not
stopRecursion - A comma-delimmited list of stoprecursion classpaths.

getModuleSettings

public any getModuleSettings(string module)
Get a module's setting structure if it exists

Parameters:
module - The module name

getMyPlugin

public any getMyPlugin(any plugin, [boolean newInstance='false'], [any module=''], [boolean init='true'])
Facade

Parameters:
plugin - The plugin name as a string
newInstance
module - The module to retrieve the plugin from
init - Auto init() the plugin upon construction

getPlugin

public any getPlugin([any plugin], [boolean customPlugin='false'], [boolean newInstance='false'], [any module=''], [boolean init='true'])
Facade

Parameters:
plugin - The Plugin object's name to instantiate, as a string
customPlugin
newInstance
module - The module to retrieve the plugin from
init - Auto init() the plugin upon construction

getResource

public any getResource(any resource, [any default], [any locale])
Facade to i18n.getResource. Returns a string.

Parameters:
resource - The resource to retrieve from the loaded localized bundle
default - A default value to send back if resource not found
locale - Pass in which locale to take the resource from. By default it uses the user's current set locale

getSetting

public any getSetting(string name, [boolean FWSetting='false'])
Facade

Parameters:
name
FWSetting

getSettingStructure

public struct getSettingStructure([boolean FWSetting='false'], [boolean DeepCopyFlag='false'])
Facade

Parameters:
FWSetting
DeepCopyFlag

getSettingsBean

public ConfigBean getSettingsBean([boolean FWSettings='false'])
Returns a configBean with all the configuration structure.

Parameters:
FWSettings - Whether to build the config bean with coldbox settings or config settings

getfwLocale

public any getfwLocale()
Get the user's currently set locale or default locale


includeUDF

public void includeUDF(string udflibrary)
Injects a UDF Library (*.cfc or *.udf) into the target object. It does not however, put the mixins on any of the cfc scopes. Therefore they can only be called internally.

Parameters:
udflibrary - The UDF library to inject.

locateDirectoryPath

public string locateDirectoryPath(string pathToCheck)
Locate the real path location of a directory in a coldbox application. 3 checks: 1) inside of coldbox app, 2) expand the path, 3) Absolute location. If path not found, it returns an empty path

Parameters:
pathToCheck - The path to check

locateFilePath

public string locateFilePath(string pathToCheck)
Locate the real path location of a file in a coldbox application. 3 checks: 1) inside of coldbox app, 2) expand the path, 3) Absolute location. If path not found, it returns an empty path

Parameters:
pathToCheck - The path to check

persistVariables

public void persistVariables([string persist=''], [struct persistStruct])
Persist variables for flash redirections

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

populateModel

public Any populateModel(any model, [string scope=''], [boolean trustedSetter='false'], [string include=''], [string exclude=''])
Populate a named or instantiated model (java/cfc) from the request collection items

Parameters:
model - The name of the model to get and populate or the acutal model object. If you already have an instance of a model, then use the populateBean() method
scope - Use scope injection instead of setters population. Ex: scope=variables.instance.
trustedSetter - If set to true, the setter method will be called even if it does not exist in the bean
include - A list of keys to include in the population
exclude - A list of keys to exclude in the population

relocate

public void relocate(string url, [boolean addtoken='false'], [boolean postProcessExempt='false'])
This method will be deprecated, please use setNextEvent() instead.

Parameters:
url
addtoken
postProcessExempt - Do not fire the postProcess interceptors

renderExternalView

public Any renderExternalView(string view, [boolean cache='false'], [string cacheTimeout=''], [string cacheLastAccessTimeout=''], [string cacheSuffix=''])
Facade to plugins' render external view.

Parameters:
view - The full path to the view. This can be an expanded path or relative. Include extension.
cache - True if you want to cache the view.
cacheTimeout - The cache timeout
cacheLastAccessTimeout - The last access timeout
cacheSuffix - Add a cache suffix to the view cache entry. Great for multi-domain caching or i18n caching.

renderView

public Any renderView(string view, [boolean cache='false'], [string cacheTimeout=''], [string cacheLastAccessTimeout=''], [string cacheSuffix=''], [string module=''])
Facade to plugin's render view.

Parameters:
view
cache - True if you want to cache the view.
cacheTimeout - The cache timeout
cacheLastAccessTimeout - The last access timeout
cacheSuffix - Add a cache suffix to the view cache entry. Great for multi-domain caching or i18n caching.
module - Explicitly render a layout from this module

runEvent

public any runEvent([string event=''], [boolean prepostExempt='false'], [boolean private='false'])
Facade to controller's runEvent() method.

Parameters:
event
prepostExempt - If true, pre/post handlers will not be fired.
private - Execute a private event or not, default is false

setDebugMode

public void setDebugMode(boolean mode)
Facade to set your debug mode

Parameters:
mode

setNextEvent

public void setNextEvent([string event], [string queryString], [boolean addToken], [string persist], [struct persistStruct], [boolean ssl], [string baseURL], [boolean postProcessExempt], [string URL], [string URI], [numeric statusCode])
Facade

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
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

setNextRoute

public void setNextRoute(string route, [string persist=''], [struct persistStruct], [boolean addToken='false'], [boolean ssl='false'])
This method is now deprecated, please use setNextEvent(). This method will be removed later on

Parameters:
route - The route to relocate to, do not prepend the baseURL or /.
persist - What request collection keys to persist in the relocation
persistStruct - A structure key-value pairs to persist.
addToken - Wether to add the tokens or not. Default is false
ssl - Whether to relocate in SSL or not

setSetting

public void setSetting(string name, any value)
Facade

Parameters:
name
value

setfwLocale

public any setfwLocale([string locale], [boolean dontloadRBFlag])
Set the default locale to use in the framework for a specific user. Utility Method

Parameters:
locale - The locale to change and set. Must be Java Style: en_US
dontloadRBFlag - Flag to load the resource bundle for the specified locale (If not already loaded) or just change the framework's locale.

settingExists

public boolean settingExists(string name, [boolean FWSetting='false'])
Facade

Parameters:
name
FWSetting

ColdBox Platform Version 2.6.4