lucee.Componentcoldbox.system.FrameworkSupertype
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- Base class for all things Box
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
controller
App Controller.
|
true
|
false
|
Method Summary | |
---|---|
string
|
addAsset(any asset)
Add a js/css asset(s) to the html head section. |
any
|
announce(any state, [struct data='[runtime expression]'], [boolean async='false'], [boolean asyncAll='false'], [boolean asyncAllJoin='true'], [any asyncPriority='NORMAL'], [numeric asyncJoinTimeout='0'])
Announce an interception. |
any
|
announceInterception(any state, [struct interceptData='[runtime expression]'], [boolean async='false'], [boolean asyncAll='false'], [boolean asyncAllJoin='true'], [any asyncPriority='NORMAL'], [numeric asyncJoinTimeout='0'])
|
any
|
async()
Return the ColdBox Async Manager instance so you can do some async or parallel programming. |
any
|
externalView(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
|
forAttribute(any data)
This function allows you to serialize simple or complex data so it can be used within HTML Attributes. |
any
|
getCache([any name='default'])
Get a named CacheBox Cache. |
any
|
getColdBoxSetting(any name, [any defaultValue])
Get a ColdBox setting. |
string
|
getController()
|
any
|
getEnv(any key, [any defaultValue])
Retrieve a environment variable only. |
any
|
getInstance([any name], [struct initArguments='[runtime expression]'], [any dsl], [any targetObject=''], [any injector])
Locates, Creates, Injects and Configures an object model instance. |
any
|
getInterceptor(any interceptorName)
Get an interceptor reference. |
any
|
getModel()
|
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
|
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, [any defaultValue])
Get a setting from the system. |
any
|
getSystemProperty(any key, [any defaultValue])
Retrieve a Java System property only!. |
any
|
getSystemSetting(any key, [any defaultValue])
Retrieve a Java System property or env value by name. |
any
|
includeUDF(any udflibrary)
Injects a UDF Library (*. |
any
|
layout([any layout], [any module=''], [any view=''], [struct args='[runtime expression]'], [any viewModule=''], [boolean prePostExempt='false'])
Render a layout or a layout + view combo. |
any
|
listen(any target, any point)
Register a closure listener as an interceptor on a specific point. |
any
|
loadApplicationHelpers([boolean force='false'])
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'], [struct memento='[runtime expression]'], [string jsonstring], [string xml], [query qry])
Populate a model object from the request Collection or a passed in memento structure. |
void
|
relocate([any event], [any URL], [any URI], [any queryString], [any persist], [struct persistStruct], [boolean addToken], [boolean ssl], [any baseURL], [boolean postProcessExempt], [numeric statusCode])
Relocate user browser requests to other events, URLs, or URIs. |
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'], [any name])
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
|
runRoute(any name, [struct params='[runtime expression]'], [boolean cache='false'], [any cacheTimeout=''], [any cacheLastAccessTimeout=''], [any cacheSuffix=''], [any cacheProvider='template'], [boolean prePostExempt='false'])
Executes internal named routes with or without parameters. |
any
|
setController(any controller)
|
any
|
setSetting(any name, any value)
Set a new setting in the system. |
boolean
|
settingExists(any name)
Check if the setting exists in the application. |
any
|
view([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'], [any name])
Render out a view. |
any
|
when(boolean target, any success, [any failure])
Functional construct for if statements. |
Methods inherited from class lucee.Component |
---|
None |
Property Detail |
---|
App Controller
access
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Add a js/css asset(s) to the html head section. You can also pass in a list of assets. This method keeps track of the loaded assets so they are only loaded once
asset
- The asset(s) to load, only js or css files. This can also be a comma delimited list.Announce an interception
state
- The interception state to announcedata
- 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.state
interceptData
async
asyncAll
asyncAllJoin
asyncPriority
asyncJoinTimeout
Return the ColdBox Async Manager instance so you can do some async or parallel programming
Renders an external view anywhere that cfinclude works.
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'This function allows you to serialize simple or complex data so it can be used within HTML Attributes.
data
- The simple or complex data to bind to an HTML AttributeGet a named CacheBox Cache
name
- The name of the cache to retrieve, if not passed, it used the 'default' cache.Get a ColdBox setting
name
- The key to getdefaultValue
- The default value if it doesn't existRetrieve a environment variable only
key
- The name of the setting to look up.defaultValue
- The default value to use if the key does not exist in the system properties or the envLocates, Creates, Injects and Configures an object model instance
name
- The mapping name or CFC instance path to try to build upinitArguments
- The constructor structure of arguments to passthrough when initializing the instancedsl
- The dsl string to use to retrieve the instance model object, mutually exclusive with 'nametargetObject
- The object requesting the dependency, usually only used by DSL lookupsinjector
- The child injector to use when retrieving the instanceGet an interceptor reference
interceptorName
- The name of the interceptor to retrieveGet a module's configuration structure
module
- The module to retrieve the configuration structure fromGet a module's settings structure or a specific setting if the setting key is passed
module
- The module to retrieve the configuration settings fromsetting
- The setting to retrieve if passeddefaultValue
- The default value to return if setting does not existRetrieve the system web renderer
Get the RC or PRC collection reference
private
- The boolean bit that says give me the RC by default or true for the private collection (PRC)Retrieve the request context object
Get a setting from the system
name
- The key of the settingdefaultValue
- If not found in config, default return valueRetrieve a Java System property only!
key
- The name of the setting to look up.defaultValue
- The default value to use if the key does not exist in the system properties or the envRetrieve a Java System property or env value by name. It looks at properties first then environment variables
key
- The name of the setting to look up.defaultValue
- The default value to use if the key does not exist in the system properties or the envInjects a UDF Library (*.cfc or *.cfm) into the target object. It does not however, put the mixins on any of the cfc scopes. Therefore they can only be called internally
udflibrary
- The UDF library to injectRender a layout or a layout + view combo
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 fireRegister a closure listener as an interceptor on a specific point
target
- The closure/lambda to registerpoint
- The interception point to register the listener toLoad the global application helper libraries defined in the applicationHelper Setting of your application. This is called by the framework ONLY! Use at your own risk
force
- Used when called by a known virtual inheritance family tree.Resolve a directory to be either relative or absolute in your application
pathToCheck
- The file path to checkResolve a file to be either relative or absolute in your application
pathToCheck
- The file path to checkPersist variables into the Flash RAM
persist
- A list of request collection keys to persistpersistStruct
- A struct of key-value pairs to persistPopulate a model object from the request Collection or a passed in memento structure
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 mementomemento
- A structure to populate the model, if not passed it defaults to the request collectionjsonstring
- If you pass a json string, we will populate your model with itxml
- If you pass an xml string, we will populate your model with itqry
- If you pass a query, we will populate your model with itRelocate user browser requests to other events, URLs, or URIs.
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 or struct 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 relocationRenders an external view anywhere that cfinclude works.
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'Render a layout or a layout + view combo
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 fireRender out a view
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 firename
- The name of the rendering region to render out, Usually all arguments are coming from the stored region but you override them using this function's arguments.Executes events with full life-cycle methods and returns the event results if any were returned.
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'Executes internal named routes with or without parameters. If the named route is not found or the route has no event to execute then this method will throw an `InvalidArgumentException`. If you need a route from a module then append the module address: `@moduleName` or prefix it like in run event calls `moduleName:routeName` in order to find the right route. The route params will be passed to events as action arguments much how eventArguments work.
name
- The name of the routeparams
- The parameters of the route to replacecache
- 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'prePostExempt
- If true, pre/post handlers will not be fired. Defaults to falsecontroller
Set a new setting in the system
name
- The key of the settingvalue
- The value of the settingCheck if the setting exists in the application
name
- The key of the settingRender out a view
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 firename
- The name of the rendering region to render out, Usually all arguments are coming from the stored region but you override them using this function's arguments.Functional construct for if statements
target
- The boolean evaluator, this can be a boolean valuesuccess
- The closure/lambda to execute if the boolean value is truefailure
- The closure/lambda to execute if the boolean value is false