WEB-INF.cftags.component coldbox.system.web.flash.AbstractFlashScope
An abstract flash scope that can be used to build ColdBox Flash scopes
Constructor Summary | |
---|---|
init(any<Controller> controller, [any<struct> defaults='[runtime expression]'])
Constructor. |
Method Summary | |
---|---|
any
|
clear()
Clear the temp flash scope and remove all data. |
any
|
clearFlash()
Clear the flash storage. |
any
|
discard([string keys=''])
Mark for discard all or a single flash temp variable for another relocation. |
boolean
|
exists(string name)
Check if an object exists in flash scope. |
boolean
|
flashExists()
Checks if the flash storage exists and IT HAS DATA to inflate. |
any
|
get(string name, [any default])
Get an object from flash scope. |
private Controller
|
getController()
Get the controller reference. |
struct
|
getDefaults()
Get flash scope default data packet. |
struct
|
getFlash()
Get the flash storage structure to inflate it. |
string
|
getKeys()
Get a list of all the objects in the temp flash scope. |
struct
|
getProperties()
Get flash scope properties. |
any
|
getProperty(any property)
Get a flash scope property, throws exception if not found. |
struct
|
getScope()
Get the flash temp request storage used throughout a request until flashed at the end of a request. |
private Util
|
getUtil()
Get the coldbox utility class. |
any
|
inflateFlash()
Inflate the flash storage into the request collection and request temp storage. |
boolean
|
isEmpty()
Check if the flash scope is empty or not. |
any
|
keep([string keys=''])
Keep all or a single flash temp variable alive for another relocation. |
any
|
persistRC([string include=''], [string exclude=''], [boolean saveNow='false'])
Persist keys from the coldbox request collection in flash scope. |
boolean
|
propertyExists(any property)
Checks wether a given flash scope property exists or not. |
any
|
put(string name, any value, [boolean saveNow='false'], [boolean keep='true'], [boolean inflateToRC='[runtime expression]'], [boolean inflateToPRC='[runtime expression]'], [boolean autoPurge='[runtime expression]'])
Put an object in temp flash scope. |
any
|
putAll(struct map, [boolean saveNow='false'], [boolean keep='true'], [boolean inflateToRC='[runtime expression]'], [boolean inflateToPRC='[runtime expression]'], [boolean autoPurge='[runtime expression]'])
Put a map of name-value pairs into the flash scope. |
any
|
remove(string name, [boolean saveNow='false'])
Remove an object from flash scope. |
any
|
removeFlash()
Remove the entire flash storage. |
any
|
saveFlash()
Save the flash storage in preparing to go to the next request. |
any
|
setProperties(any<struct> properties)
Set flash scope properties. |
any
|
setProperty(any property, any value)
Set a flash scope property. |
numeric
|
size()
Get the size of the items in flash scope. |
private any
|
statusMarks([string keys=''], boolean keep)
Change the status marks of the temp scope entries. |
Methods inherited from class WEB-INF.cftags.component |
---|
None |
Constructor Detail |
---|
Constructor
controller
- The ColdBox Controllerdefaults
- Default flash data packet for the flash RAM object=[scope,properties,inflateToRC,inflateToPRC,autoPurge,autoSave]Method Detail |
---|
Clear the temp flash scope and remove all data
Clear the flash storage
Mark for discard all or a single flash temp variable for another relocation. You can also remove them if you like.
keys
- The keys in the flash ram that you want to be discarded until the next relocationCheck if an object exists in flash scope
name
- The name of the valueChecks if the flash storage exists and IT HAS DATA to inflate.
Get an object from flash scope
name
- The name of the valuedefault
- The default value if the scope does not have the objectGet the controller reference
Get flash scope default data packet
Get the flash storage structure to inflate it.
Get a list of all the objects in the temp flash scope
Get flash scope properties
Get a flash scope property, throws exception if not found.
property
- The key of the property to return.Get the flash temp request storage used throughout a request until flashed at the end of a request.
Get the coldbox utility class
Inflate the flash storage into the request collection and request temp storage
Check if the flash scope is empty or not
Keep all or a single flash temp variable alive for another relocation.
keys
- The keys in the flash ram that you want to mark to be kept until the next relocationPersist keys from the coldbox request collection in flash scope. If using exclude, then it will try to persist the entire rc but excluding. Including will only include the keys passed.
include
- MUTEX: A list of request collection keys you want to persistexclude
- MUTEX: A list of request collection keys you want to exclude from persisting. If sent, then we inspect all rc keys.saveNow
- Whether to send the contents for saving to flash ram or not. Default is to wait for a relocationChecks wether a given flash scope property exists or not.
property
- The property namePut an object in temp flash scope
name
- The name of the valuevalue
- The value to storesaveNow
- Whether to send the contents for saving to flash ram or not. Default is to wait for a relocationkeep
- Whether to mark the entry to be kept after saving to the flash storage.inflateToRC
- Whether this flash variable is inflated to the Request Collection or notinflateToPRC
- Whether this flash variable is inflated to the Private Request Collection or notautoPurge
- Flash memory auto purges variables for you. You can control this purging by saying false to autoPurge.Put a map of name-value pairs into the flash scope
map
- The map of data to flashsaveNow
- Whether to send the contents for saving to flash ram or not. Default is to wait for a relocationkeep
- Whether to mark the entry to be kept after saving to the flash storage.inflateToRC
- Whether this flash variable is inflated to the Request Collection or notinflateToPRC
- Whether this flash variable is inflated to the Private Request Collection or notautoPurge
- Flash memory auto purges variables for you. You can control this purging by saying false to autoPurge.Remove an object from flash scope
name
- The name of the valuesaveNow
- Whether to send the contents for saving to flash ram or not. Default is to wait for a relocationRemove the entire flash storage
Save the flash storage in preparing to go to the next request
Set flash scope properties
properties
Set a flash scope property
property
- The property name to set.value
- The value of the property.Get the size of the items in flash scope
Change the status marks of the temp scope entries
keys
- The keys in the flash ram that you want to be discarded or kept until the next relocationkeep
- Keep or Discard