box.system.web.flash.concurrent.Callable interface"> Callable
ColdBox Platform Version 3.1.0

coldbox.system.web.flash
Class AbstractFlashScope

WEB-INF.cftags.component
        extended by coldbox.system.web.flash.AbstractFlashScope
Direct Known Subclasses:
ClientFlash , ClusterFlash , ColdboxCacheFlash , MockFlash , SessionFlash

public class AbstractFlashScope
extends WEB-INF.cftags.component

An abstract flash scope that can be used to build ColdBox Flash scopes


Constructor Summary
init(Controller controller)
          Constructor
 
Method Summary
 void clear()
          Clear the temp flash scope and remove all data
 void clearFlash()
          Clear the flash storage
 void 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 getFlash()
          Get the flash storage structure to inflate it
 string getKeys()
          Get a list of all the objects in the temp flash scope
 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
 void inflateFlash()
          Inflate the flash storage into the request collection and request temp storage
 boolean isEmpty()
          Check if the flash scope is empty or not
 void keep([string keys=''])
          Keep all or a single flash temp variable alive for another relocation
 void persistRC([string include=''], [string exclude=''], [boolean saveNow='false'])
          Persist keys from the coldbox request collection in flash scope
 void put(string name, any value, [boolean saveNow='false'], [boolean keep='true'], [boolean inflateToRC='true'], [boolean inflateToPRC='false'], [boolean autoPurge='true'])
          Put an object in temp flash scope
 void putAll(struct map, [boolean saveNow='false'], [boolean keep='true'], [boolean inflateToRC='true'], [boolean inflateToPRC='false'], [boolean autoPurge='true'])
          Put a map of name-value pairs into the flash scope
 void remove(string name, [boolean saveNow='false'])
          Remove an object from flash scope
 void removeFlash()
          Remove the entire flash storage
 void saveFlash()
          Save the flash storage in preparing to go to the next request
 numeric size()
          Get the size of the items in flash scope
private void statusMarks([string keys=''], boolean keep)
          Change the status marks of the temp scope entries
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(Controller controller)
Constructor

Parameters:
controller - The ColdBox Controller
Method Detail

clear

public void clear()
Clear the temp flash scope and remove all data


clearFlash

public void clearFlash()
Clear the flash storage


discard

public void discard([string keys=''])
Mark for discard all or a single flash temp variable for another relocation. You can also remove them if you like.

Parameters:
keys - The keys in the flash ram that you want to be discarded until the next relocation

exists

public boolean exists(string name)
Check if an object exists in flash scope

Parameters:
name - The name of the value

flashExists

public boolean flashExists()
Checks if the flash storage exists and IT HAS DATA to inflate.


get

public any get(string name, [any default])
Get an object from flash scope

Parameters:
name - The name of the value
default - The default value if the scope does not have the object

getController

private Controller getController()
Get the controller reference


getFlash

public struct getFlash()
Get the flash storage structure to inflate it.


getKeys

public string getKeys()
Get a list of all the objects in the temp flash scope


getScope

public struct getScope()
Get the flash temp request storage used throughout a request until flashed at the end of a request.


getUtil

private Util getUtil()
Get the coldbox utility class


inflateFlash

public void inflateFlash()
Inflate the flash storage into the request collection and request temp storage


isEmpty

public boolean isEmpty()
Check if the flash scope is empty or not


keep

public void keep([string keys=''])
Keep all or a single flash temp variable alive for another relocation.

Parameters:
keys - The keys in the flash ram that you want to mark to be kept until the next relocation

persistRC

public void persistRC([string include=''], [string exclude=''], [boolean saveNow='false'])
Persist 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.

Parameters:
include - MUTEX: A list of request collection keys you want to persist
exclude - 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 relocation

put

public void put(string name, any value, [boolean saveNow='false'], [boolean keep='true'], [boolean inflateToRC='true'], [boolean inflateToPRC='false'], [boolean autoPurge='true'])
Put an object in temp flash scope

Parameters:
name - The name of the value
value - The value to store
saveNow - Whether to send the contents for saving to flash ram or not. Default is to wait for a relocation
keep - 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 not
inflateToPRC - Whether this flash variable is inflated to the Private Request Collection or not
autoPurge - Flash memory auto purges variables for you. You can control this purging by saying false to autoPurge.

putAll

public void putAll(struct map, [boolean saveNow='false'], [boolean keep='true'], [boolean inflateToRC='true'], [boolean inflateToPRC='false'], [boolean autoPurge='true'])
Put a map of name-value pairs into the flash scope

Parameters:
map - The map of data to flash
saveNow - Whether to send the contents for saving to flash ram or not. Default is to wait for a relocation
keep - 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 not
inflateToPRC - Whether this flash variable is inflated to the Private Request Collection or not
autoPurge - Flash memory auto purges variables for you. You can control this purging by saying false to autoPurge.

remove

public void remove(string name, [boolean saveNow='false'])
Remove an object from flash scope

Parameters:
name - The name of the value
saveNow - Whether to send the contents for saving to flash ram or not. Default is to wait for a relocation

removeFlash

public void removeFlash()
Remove the entire flash storage


saveFlash

public void saveFlash()
Save the flash storage in preparing to go to the next request


size

public numeric size()
Get the size of the items in flash scope


statusMarks

private void statusMarks([string keys=''], boolean keep)
Change the status marks of the temp scope entries

Parameters:
keys - The keys in the flash ram that you want to be discarded or kept until the next relocation
keep - Keep or Discard

ColdBox Platform Version 3.1.0