ColdBox Platform Version 3.7.0

coldbox.system.plugins
Class ApplicationStorage

WEB-INF.cftags.component
        extended by coldbox.system.FrameworkSupertype
            extended by coldbox.system.Plugin
                extended by coldbox.system.plugins.ApplicationStorage

public class ApplicationStorage
extends Plugin

Application Storage plugin. It provides the user with a mechanism for permanent data storage using the application scope.


Constructor Summary
init(any controller)
          Constructor
 
Method Summary
 void clearAll()
          Clear the entire coldbox application storage
private void createStorage()
          Create the app storage scope
 boolean deleteVar(string name)
          Tries to delete a permanent application variable
 boolean exists(string name)
          Checks wether the permanent variable exists
 struct getStorage()
          Get the entire storage scope structure
 any getVar(string name, [any default=''])
          Get a new permanent variable
 void removeStorage()
          remove the entire storage from scope
 void setVar(string name, any value)
          Set a new permanent variable
 
Methods inherited from class coldbox.system.Plugin
getPluginDescription, getPluginName, getPluginVersion, getRequestCollection, getRequestContext, getpluginAuthor, getpluginAuthorURL, getpluginPath, setPluginDescription, setPluginName, setPluginVersion, setpluginAuthor, setpluginAuthorURL
 
Methods inherited from class coldbox.system.FrameworkSupertype
$abort, $dump, $htmlhead, $include, $rethrow, $throw, addAsset, announceInterception, getColdboxOCM, getController, getDatasource, getDebugMode, getInterceptor, getMailService, getMailSettings, getMemento, getModel, getModuleSettings, getMyPlugin, getNewMail, getPlugin, getResource, getSetting, getSettingStructure, getSettingsBean, getValidationManager, getfwLocale, includeUDF, loadGlobalUDFLibraries, locateDirectoryPath, locateFilePath, persistVariables, populateModel, relocate, renderExternalView, renderLayout, renderView, runEvent, setDebugMode, setNextEvent, setNextRoute, setSetting, setfwLocale, settingExists, validateModel
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any controller)
Constructor

Parameters:
controller - coldbox.system.web.Controller
Method Detail

clearAll

public void clearAll()
Clear the entire coldbox application storage


createStorage

private void createStorage()
Create the app storage scope. Thread Safe


deleteVar

public boolean deleteVar(string name)
Tries to delete a permanent application variable. Returns True if deleted.

Parameters:
name - The variable name to retrieve.

exists

public boolean exists(string name)
Checks wether the permanent variable exists.

Parameters:
name - The variable name to retrieve.

getStorage

public struct getStorage()
Get the entire storage scope structure


getVar

public any getVar(string name, [any default=''])
Get a new permanent variable. If the variable does not exist. The method returns blank unless using the default return argument.

Parameters:
name - The variable name to retrieve.
default - The default value to set. If not used, a blank is returned.

removeStorage

public void removeStorage()
remove the entire storage from scope


setVar

public void setVar(string name, any value)
Set a new permanent variable.

Parameters:
name - The name of the variable.
value - The value to set in the variable.

ColdBox Platform Version 3.7.0