ColdBox Platform v3.8.0

coldbox.system.plugins
Class CookieStorage

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

public class CookieStorage
extends Plugin

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

Constructor Summary
init(any<Controller> controller)
          Constructor
 
Method Summary
private any decryptIt(string decValue)
          Return decrypted value
 boolean deleteVar(string name, [string domain=''])
          Tries to delete a permanent cookie variable
private any encryptIt(string encValue)
          Return encrypted value
 boolean exists(string name)
          Checks wether the permanent variable exists in the storage
 boolean getEncryption()
          Get Encryption flag
 string getEncryptionAlgorithm()
          Get the EncryptionAlgorithm
 string getEncryptionEncoding()
          Get EncryptionEncoding value
 string getEncryptionKey()
          Get the EncryptionKey
 any getVar(any name, [any default=''])
          Get a new permanent variable
 void setEncryption(boolean Encryption)
          Set Encryption flag
 void setEncryptionAlgorithm(string EncryptionAlgorithm)
          Set EncryptionAlgorithm for this storage
 void setEncryptionEncoding(string EncryptionEncoding)
          Set EncryptionEncoding value
 void setEncryptionKey(string EncryptionKey)
          Set EncryptionKey for this storage
 void setVar(string name, any value, [numeric expires='0'], [boolean secure='false'], [string path=''], [string domain=''])
          Set a new permanent variable in the storage
 
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
None
 

Constructor Detail

init

public init(any<Controller> controller)
Constructor

Parameters:
controller
Method Detail

decryptIt

private any decryptIt(string decValue)
Return decrypted value

Parameters:
decValue - string to be decrypted

deleteVar

public boolean deleteVar(string name, [string domain=''])
Tries to delete a permanent cookie variable

Parameters:
name - The variable name to retrieve.
domain - Domain in which cookie is valid and to which cookie content can be sent from the user's system.

encryptIt

private any encryptIt(string encValue)
Return encrypted value

Parameters:
encValue - string to be encrypted

exists

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

Parameters:
name - The variable name to retrieve.

getEncryption

public boolean getEncryption()
Get Encryption flag


getEncryptionAlgorithm

public string getEncryptionAlgorithm()
Get the EncryptionAlgorithm


getEncryptionEncoding

public string getEncryptionEncoding()
Get EncryptionEncoding value


getEncryptionKey

public string getEncryptionKey()
Get the EncryptionKey


getVar

public any getVar(any name, [any default=''])
Get a new permanent variable. If the cookie does not exist. The method returns blank or use the default value argument

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

setEncryption

public void setEncryption(boolean Encryption)
Set Encryption flag

Parameters:
Encryption

setEncryptionAlgorithm

public void setEncryptionAlgorithm(string EncryptionAlgorithm)
Set EncryptionAlgorithm for this storage

Parameters:
EncryptionAlgorithm

setEncryptionEncoding

public void setEncryptionEncoding(string EncryptionEncoding)
Set EncryptionEncoding value

Parameters:
EncryptionEncoding

setEncryptionKey

public void setEncryptionKey(string EncryptionKey)
Set EncryptionKey for this storage

Parameters:
EncryptionKey

setVar

public void setVar(string name, any value, [numeric expires='0'], [boolean secure='false'], [string path=''], [string domain=''])
Set a new permanent variable in the storage.

Parameters:
name - The name of the variable.
value - The value to set in the variable, simple, array, query or structure.
expires - Cookie Expire in number of days. [default cookie is session only = 0 days]
secure - If browser does not support Secure Sockets Layer (SSL) security, the cookie is not sent. To use the cookie, the page must be accessed using the https protocol.
path - URL, within a domain, to which the cookie applies; typically a directory. Only pages in this path can use the cookie. By default, all pages on the server that set the cookie can access the cookie.
domain - Domain in which cookie is valid and to which cookie content can be sent from the user's system.

ColdBox Platform v3.8.0