|
TestBox 2.4.0 | ||||
FRAMES |
railo-context.Componenttestbox.samples.resources.coldbox.system.FrameworkSupertype
public class FrameworkSupertype
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.coldbox.org | www.luismajano.com | www.ortussolutions.com Base class for all things Box
Method Summary | |
---|---|
string |
addAsset(any asset)
Add a js/css asset(s) to the html head section |
any |
announceInterception(any state, [struct interceptData='[runtime expression]'], [boolean async='false'], [boolean asyncAll='false'], [boolean asyncAllJoin='true'], [any asyncPriority='NORMAL'], [numeric asyncJoinTimeout='0'])
Announce an interception to the system |
any |
getCache([any name='default'])
Get a named CacheBox Cache |
string |
getController()
|
struct |
getDatasource(any alias)
Get a datasource structure representation |
any |
getInstance([any name], [any dsl], [any initArguments='[runtime expression]'])
Get a instance object from WireBox |
any |
getInterceptor(any interceptorName)
Get an interceptor reference |
any |
getModel([any name], [any dsl], [any initArguments='[runtime expression]'])
Get a model object |
struct |
getModuleConfig(any module)
Get a module's configuration structure |
any |
getModuleSettings(any module, [any setting], [any defaultValue])
Get a module's settings structure or a specific setting if the setting key is passed |
any |
getMyPlugin()
|
any |
getPlugin()
REMOVE THE FOLLOWING: JUST LEFT UNTIL COMPLETELY REMOVED *** |
any |
getRenderer()
Retrieve the system web renderer |
struct |
getRequestCollection([boolean private='false'])
Get the RC or PRC collection reference |
any |
getRequestContext()
Retrieve the request context object |
any |
getSetting(any name, [boolean fwSetting='false'], [any defaultValue])
Get a setting from the system |
any |
getSettingStructure([boolean fwSetting='false'], [boolean deepCopy='false'])
DEPRECATED: Get all the settings structure |
any |
includeUDF(any udflibrary)
Injects a UDF Library (* |
any |
loadApplicationHelpers()
Load the global application helper libraries defined in the applicationHelper Setting of your application |
string |
locateDirectoryPath(any pathToCheck)
Resolve a directory to be either relative or absolute in your application |
string |
locateFilePath(any pathToCheck)
Resolve a file to be either relative or absolute in your application |
any |
persistVariables([any persist=''], [struct persistStruct='[runtime expression]'])
Persist variables into the Flash RAM |
any |
populateModel(any model, [any scope=''], [boolean trustedSetter='false'], [any include=''], [any exclude=''], [boolean ignoreEmpty='false'], [any nullEmptyInclude=''], [any nullEmptyExclude=''], [boolean composeRelationships='false'])
Populate a model object from the request Collection |
any |
renderExternalView(any view, [struct args='[runtime expression]'], [boolean cache='false'], [any cacheTimeout=''], [any cacheLastAccessTimeout=''], [any cacheSuffix=''], [any cacheProvider='template'])
Renders an external view anywhere that cfinclude works |
any |
renderLayout([any layout], [any module=''], [any view=''], [struct args='[runtime expression]'], [any viewModule=''], [boolean prePostExempt='false'])
Render a layout or a layout + view combo |
any |
renderView([any view=''], [struct args='[runtime expression]'], [any module=''], [boolean cache='false'], [any cacheTimeout=''], [any cacheLastAccessTimeout=''], [any cacheSuffix=''], [any cacheProvider='template'], [any collection], [any collectionAs=''], [numeric collectionStartRow='1'], [numeric collectionMaxRows='0'], [any collectionDelim=''], [boolean prePostExempt='false'])
Render out a view |
any |
runEvent([any event=''], [boolean prePostExempt='false'], [boolean private='false'], [boolean defaultEvent='false'], [struct eventArguments='[runtime expression]'], [boolean cache='false'], [any cacheTimeout=''], [any cacheLastAccessTimeout=''], [any cacheSuffix=''], [any cacheProvider='template'])
Executes events with full life-cycle methods and returns the event results if any were returned |
any |
setController(any controller)
|
void |
setNextEvent([any event], [any URL], [any URI], [any queryString], [any persist], [struct persistStruct], [boolean addToken], [boolean ssl], [any baseURL], [boolean postProcessExempt], [numeric statusCode])
Relocate the user to another location |
any |
setSetting(any name, any value)
Set a new setting in the system |
boolean |
settingExists(any name, [boolean fwSetting='false'])
Verify a setting from the system |
Methods inherited from class railo-context.Component |
---|
|
Method Detail |
---|
public string addAsset(any asset)
asset
- The asset(s) to load, only js or css files. This can also be a comma delimmited list.public any announceInterception(any state, [struct interceptData='[runtime expression]'], [boolean async='false'], [boolean asyncAll='false'], [boolean asyncAllJoin='true'], [any asyncPriority='NORMAL'], [numeric asyncJoinTimeout='0'])
state
- The event to announceinterceptData
- A data structure used to pass intercepted information.async
- If true, the entire interception chain will be ran in a separate thread.asyncAll
- If true, each interceptor in the interception chain will be ran in a separate thread and then joined together at the end.asyncAllJoin
- If true, each interceptor in the interception chain will be ran in a separate thread and joined together at the end by default. If you set this flag to false then there will be no joining and waiting for the threads to finalize.asyncPriority
- The thread priority to be used. Either LOW, NORMAL or HIGH. The default value is NORMALasyncJoinTimeout
- The timeout in milliseconds for the join thread to wait for interceptor threads to finish. By default there is no timeout.public any getCache([any name='default'])
name
- The name of the cache to retrieve, if not passed, it used the 'default' cache.public string getController()
public struct getDatasource(any alias)
alias
- The alias of the datasource to get from the config structurespublic any getInstance([any name], [any dsl], [any initArguments='[runtime expression]'])
name
- The mapping name or CFC path to retrievedsl
- The DSL string to use to retrieve an instanceinitArguments
- The constructor structure of arguments to passthrough when initializing the instancepublic any getInterceptor(any interceptorName)
interceptorName
- The name of the interceptor to retrievepublic any getModel([any name], [any dsl], [any initArguments='[runtime expression]'])
name
- The mapping name or CFC path to retrievedsl
- The DSL string to use to retrieve an instanceinitArguments
- The constructor structure of arguments to passthrough when initializing the instancepublic struct getModuleConfig(any module)
module
- The module to retrieve the configuration structure frompublic any getModuleSettings(any module, [any setting], [any defaultValue])
module
- The module to retrieve the configuration settings fromsetting
- The setting to retrieve if passeddefaultValue
- The default value to return if setting does not existpublic any getMyPlugin()
public any getPlugin()
public any getRenderer()
public struct getRequestCollection([boolean private='false'])
private
- The boolean bit that says give me the RC by default or true for the private collection (PRC)public any getRequestContext()
public any getSetting(any name, [boolean fwSetting='false'], [any defaultValue])
name
- The key of the settingfwSetting
- Retrieve from the config or fw settings, defaults to configdefaultValue
- If not found in config, default return valuepublic any getSettingStructure([boolean fwSetting='false'], [boolean deepCopy='false'])
fwSetting
- Retrieve from the config or fw settings, defaults to configdeepCopy
- Do a deep or shallow copy, shallow is defaultpublic any includeUDF(any udflibrary)
udflibrary
- The UDF library to injectpublic any loadApplicationHelpers()
public string locateDirectoryPath(any pathToCheck)
pathToCheck
- The file path to checkpublic string locateFilePath(any pathToCheck)
pathToCheck
- The file path to checkpublic any persistVariables([any persist=''], [struct persistStruct='[runtime expression]'])
persist
- A list of request collection keys to persistpersistStruct
- A struct of key-value pairs to persistpublic any populateModel(any model, [any scope=''], [boolean trustedSetter='false'], [any include=''], [any exclude=''], [boolean ignoreEmpty='false'], [any nullEmptyInclude=''], [any nullEmptyExclude=''], [boolean composeRelationships='false'])
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() methodscope
- 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 objectinclude
- A list of keys to include in the populationexclude
- A list of keys to exclude in the populationignoreEmpty
- Ignore empty values on populations, great for ORM populationnullEmptyInclude
- A list of keys to NULL when emptynullEmptyExclude
- A list of keys to NOT NULL when emptycomposeRelationships
- Automatically attempt to compose relationships from mementopublic any renderExternalView(any view, [struct args='[runtime expression]'], [boolean cache='false'], [any cacheTimeout=''], [any cacheLastAccessTimeout=''], [any cacheSuffix=''], [any cacheProvider='template'])
view
- The the view to renderargs
- A struct of arguments to pass into the view for rendering, will be available as 'args' in the view.cache
- Cached the view output or not, defaults to falsecacheTimeout
- The time in minutes to cache the viewcacheLastAccessTimeout
- The time in minutes the view will be removed from cache if idle or requestedcacheSuffix
- The suffix to add into the cache entry for this view renderingcacheProvider
- The provider to cache this view in, defaults to 'template'public any renderLayout([any layout], [any module=''], [any view=''], [struct args='[runtime expression]'], [any viewModule=''], [boolean prePostExempt='false'])
layout
- The layout to render outmodule
- The module to explicitly render this layout fromview
- The view to render within this layoutargs
- An optional set of arguments that will be available to this layouts/view rendering ONLYviewModule
- The module to explicitly render the view fromprePostExempt
- If true, pre/post layout interceptors will not be fired. By default they do firepublic any renderView([any view=''], [struct args='[runtime expression]'], [any module=''], [boolean cache='false'], [any cacheTimeout=''], [any cacheLastAccessTimeout=''], [any cacheSuffix=''], [any cacheProvider='template'], [any collection], [any collectionAs=''], [numeric collectionStartRow='1'], [numeric collectionMaxRows='0'], [any collectionDelim=''], [boolean prePostExempt='false'])
view
- The the view to render, if not passed, then we look in the request context for the current set view.args
- A struct of arguments to pass into the view for rendering, will be available as 'args' in the view.module
- The module to render the view from explicitlycache
- Cached the view output or not, defaults to falsecacheTimeout
- The time in minutes to cache the viewcacheLastAccessTimeout
- The time in minutes the view will be removed from cache if idle or requestedcacheSuffix
- The suffix to add into the cache entry for this view renderingcacheProvider
- The provider to cache this view in, defaults to 'template'collection
- A collection to use by this Renderer to render the view as many times as the items in the collection (Array or Query)collectionAs
- The name of the collection variable in the partial rendering. If not passed, we will use the name of the view by conventioncollectionStartRow
- The start row to limit the collection rendering withcollectionMaxRows
- The max rows to iterate over the collection rendering withcollectionDelim
- A string to delimit the collection renderings byprePostExempt
- If true, pre/post view interceptors will not be fired. By default they do firepublic any runEvent([any event=''], [boolean prePostExempt='false'], [boolean private='false'], [boolean defaultEvent='false'], [struct eventArguments='[runtime expression]'], [boolean cache='false'], [any cacheTimeout=''], [any cacheLastAccessTimeout=''], [any cacheSuffix=''], [any cacheProvider='template'])
event
- The event string to execute, if nothing is passed we will execute the application's default event.prePostExempt
- If true, pre/post handlers will not be fired. Defaults to falseprivate
- Execute a private event if set, else defaults to public eventsdefaultEvent
- The flag that let's this service now if it is the default event running or not. USED BY THE FRAMEWORK ONLYeventArguments
- A collection of arguments to passthrough to the calling event handler methodcache
- Cached the output of the runnable execution, defaults to false. A unique key will be created according to event string + arguments.cacheTimeout
- The time in minutes to cache the resultscacheLastAccessTimeout
- The time in minutes the results will be removed from cache if idle or requestedcacheSuffix
- The suffix to add into the cache entry for this event renderingcacheProvider
- The provider to cache this event rendering in, defaults to 'template'public any setController(any controller)
controller
public void setNextEvent([any event], [any URL], [any URI], [any queryString], [any persist], [struct persistStruct], [boolean addToken], [boolean ssl], [any baseURL], [boolean postProcessExempt], [numeric statusCode])
event
- The name of the event to run, if not passed, then it will use the default event found in your configuration fileURL
- 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'queryString
- The query string to append, if needed. If in SES mode it will be translated to convention name value pairspersist
- What request collection keys to persist in flash rampersistStruct
- A structure key-value pairs to persist in flash ramaddToken
- Wether to add the tokens or not. Default is falsessl
- Whether to relocate in SSL or notbaseURL
- 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.cfmpostProcessExempt
- Do not fire the postProcess interceptorsstatusCode
- The status code to use in the relocationpublic any setSetting(any name, any value)
name
- The key of the settingvalue
- The value of the settingpublic boolean settingExists(any name, [boolean fwSetting='false'])
name
- The key of the settingfwSetting
- Retrieve from the config or fw settings, defaults to config
|
TestBox 2.4.0 | ||||
FRAMES |