railo.runtime.type.scope
Class CookieImpl

java.lang.Object
  extended by railo.runtime.type.util.StructSupport
      extended by railo.runtime.type.StructImpl
          extended by railo.runtime.type.scope.ScopeSupport
              extended by railo.runtime.type.scope.CookieImpl
All Implemented Interfaces:
Serializable, Cloneable, Map, Dumpable, Castable, Collection, Iteratorable, Scope, Cookie, ScriptProtected, Sizeable, Struct

public final class CookieImpl
extends ScopeSupport
implements Cookie, ScriptProtected

Implementation of the Cookie scope

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface railo.runtime.type.Collection
Collection.Key
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
static int NEVER
           
 
Fields inherited from class railo.runtime.type.scope.ScopeSupport
APPLICATION, CGI, CLIENT, CLUSTER, COOKIE, FORM, REQUEST, SCOPE_COUNT, SCOPE_VAR, SESSION, URL
 
Fields inherited from class railo.runtime.type.StructImpl
TYPE_SOFT
 
Fields inherited from interface railo.runtime.type.Scope
SCOPE_APPLICATION, SCOPE_ARGUMENTS, SCOPE_CALLER, SCOPE_CGI, SCOPE_CLIENT, SCOPE_CLUSTER, SCOPE_COOKIE, SCOPE_COUNT, SCOPE_FORM, SCOPE_LOCAL, SCOPE_REQUEST, SCOPE_SERVER, SCOPE_SESSION, SCOPE_UNDEFINED, SCOPE_URL, SCOPE_VARIABLES
 
Fields inherited from interface railo.runtime.type.Struct
TYPE_LINKED, TYPE_REGULAR, TYPE_SYNC, TYPE_WEAKED
 
Fields inherited from interface railo.runtime.type.scope.ScriptProtected
NO, UNDEFINED, YES
 
Constructor Summary
CookieImpl()
          constructor for the Cookie Scope
 
Method Summary
 void clear()
          clears the collection
 String dec(String str)
           
 String enc(String str)
           
 void initialize(PageContext pc)
          Initalize Scope
 boolean isScriptProtected()
           
 void release()
          release scope for reuse
 Object remove(Collection.Key key)
          removes value from collection and return it when it exists, otherwise throws a exception
 Object remove(Collection.Key key, boolean alsoInResponse)
           
 Object remove(String key)
           
 Object removeEL(Collection.Key key)
          removes value from collection and return it when it exists, otherwise returns null
 Object set(Collection.Key key, Object value)
          sets a value to the collection
 void setCookie(Collection.Key key, Object value, int expires, boolean secure, String path, String domain)
          set a cookie value
 void setCookie(Collection.Key key, Object value, Object expires, boolean secure, String path, String domain)
          set a cookie value
 void setCookie(String name, Object value, int expires, boolean secure, String path, String domain)
          set a cookie value
 void setCookie(String name, Object value, Object expires, boolean secure, String path, String domain)
          set a cookie value
 void setCookieEL(Collection.Key key, Object value, int expires, boolean secure, String path, String domain)
          set a cookie value
 void setCookieEL(String name, Object value, int expires, boolean secure, String path, String domain)
          set a cookie value
 Object setEL(Collection.Key key, Object value)
          sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
 void setScriptProtecting(boolean scriptProtected)
          transform the string values of the scope do a script protecting way
 
Methods inherited from class railo.runtime.type.scope.ScopeSupport
_getId, getType, getTypeAsString, isInitalized, sizeOf, toDumpData, toDumpData
 
Methods inherited from class railo.runtime.type.StructImpl
containsKey, containsValue, copy, duplicate, get, get, keyIterator, keys, keysAsString, size, valueIterator, values
 
Methods inherited from class railo.runtime.type.util.StructSupport
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, clone, compareTo, compareTo, compareTo, compareTo, containsKey, containsKey, entrySet, equals, get, get, get, invalidKey, isEmpty, iterator, keySet, put, putAll, remove, set, setEL, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface railo.runtime.type.Scope
getType, getTypeAsString, isInitalized
 
Methods inherited from interface railo.runtime.type.Collection
clone, containsKey, containsKey, duplicate, get, get, get, get, keys, keysAsString, set, setEL, size
 
Methods inherited from interface railo.runtime.dump.Dumpable
toDumpData
 
Methods inherited from interface railo.runtime.type.Iteratorable
iterator, keyIterator, valueIterator
 
Methods inherited from interface railo.runtime.op.Castable
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, compareTo, compareTo, compareTo, compareTo
 
Methods inherited from interface java.util.Map
containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

NEVER

public static final int NEVER
See Also:
Constant Field Values
Constructor Detail

CookieImpl

public CookieImpl()
constructor for the Cookie Scope

Method Detail

setEL

public Object setEL(Collection.Key key,
                    Object value)
Description copied from interface: Collection
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null

Specified by:
setEL in interface Collection
Overrides:
setEL in class StructImpl
Parameters:
key - key of the value to get
value - value to set
Returns:
value on key position or null
See Also:
StructImpl.setEL(railo.runtime.type.Collection.Key, java.lang.Object)

set

public Object set(Collection.Key key,
                  Object value)
           throws PageException
Description copied from interface: Collection
sets a value to the collection

Specified by:
set in interface Collection
Overrides:
set in class StructImpl
Parameters:
key - key of the new value
value - value to set
Returns:
value setted
Throws:
PageException
See Also:
Collection.set(railo.runtime.type.Collection.Key, java.lang.Object)

clear

public void clear()
Description copied from interface: Collection
clears the collection

Specified by:
clear in interface Map
Specified by:
clear in interface Collection
Overrides:
clear in class StructImpl
See Also:
Collection.clear()

remove

public Object remove(String key)
              throws PageException
Overrides:
remove in class StructImpl
Throws:
PageException
See Also:
railo.runtime.type.Collection#remove(java.lang.String)

remove

public Object remove(Collection.Key key)
              throws PageException
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise throws a exception

Specified by:
remove in interface Collection
Overrides:
remove in class StructImpl
Parameters:
key - key of the collection
Returns:
removed Object
Throws:
PageException
See Also:
Collection.remove(railo.runtime.type.Collection.Key)

remove

public Object remove(Collection.Key key,
                     boolean alsoInResponse)
              throws PageException
Throws:
PageException

removeEL

public Object removeEL(Collection.Key key)
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise returns null

Specified by:
removeEL in interface Collection
Overrides:
removeEL in class StructImpl
Parameters:
key - key of the collection
Returns:
removed Object
See Also:
Collection.removeEL(railo.runtime.type.Collection.Key)

setCookie

public void setCookie(String name,
                      Object value,
                      Object expires,
                      boolean secure,
                      String path,
                      String domain)
               throws PageException
Description copied from interface: Cookie
set a cookie value

Specified by:
setCookie in interface Cookie
Parameters:
name - name of the cookie
value - value of the cookie
expires - expirs of the cookie (Date, number in seconds or keyword as string )
secure - set secure or not
path - path of the cookie
domain - domain of the cookie
Throws:
PageException
See Also:
Cookie.setCookie(java.lang.String, java.lang.Object, java.lang.Object, boolean, java.lang.String, java.lang.String)

setCookie

public void setCookie(Collection.Key key,
                      Object value,
                      Object expires,
                      boolean secure,
                      String path,
                      String domain)
               throws PageException
Description copied from interface: Cookie
set a cookie value

Specified by:
setCookie in interface Cookie
Parameters:
key - name of the cookie
value - value of the cookie
expires - expirs of the cookie (Date, number in seconds or keyword as string )
secure - set secure or not
path - path of the cookie
domain - domain of the cookie
Throws:
PageException

setCookie

public void setCookie(String name,
                      Object value,
                      int expires,
                      boolean secure,
                      String path,
                      String domain)
               throws PageException
Description copied from interface: Cookie
set a cookie value

Specified by:
setCookie in interface Cookie
Parameters:
name - Name of the cookie
value - value of the cookie
expires - expires in seconds
secure - secute or not
path - path of the cookie
domain - domain of the cookie
Throws:
PageException
See Also:
Cookie.setCookie(java.lang.String, java.lang.Object, int, boolean, java.lang.String, java.lang.String)

setCookie

public void setCookie(Collection.Key key,
                      Object value,
                      int expires,
                      boolean secure,
                      String path,
                      String domain)
               throws PageException
Description copied from interface: Cookie
set a cookie value

Specified by:
setCookie in interface Cookie
Parameters:
key - Name of the cookie
value - value of the cookie
expires - expires in seconds
secure - secute or not
path - path of the cookie
domain - domain of the cookie
Throws:
PageException
See Also:
Cookie.setCookie(railo.runtime.type.Collection.Key, java.lang.Object, int, boolean, java.lang.String, java.lang.String)

setCookieEL

public void setCookieEL(String name,
                        Object value,
                        int expires,
                        boolean secure,
                        String path,
                        String domain)
Description copied from interface: Cookie
set a cookie value

Specified by:
setCookieEL in interface Cookie
Parameters:
name - Name of the cookie
value - value of the cookie
expires - expires in seconds
secure - secute or not
path - path of the cookie
domain - domain of the cookie
See Also:
Cookie.setCookieEL(java.lang.String, java.lang.Object, int, boolean, java.lang.String, java.lang.String)

setCookieEL

public void setCookieEL(Collection.Key key,
                        Object value,
                        int expires,
                        boolean secure,
                        String path,
                        String domain)
Description copied from interface: Cookie
set a cookie value

Specified by:
setCookieEL in interface Cookie
Parameters:
key - Name of the cookie
value - value of the cookie
expires - expires in seconds
secure - secute or not
path - path of the cookie
domain - domain of the cookie

initialize

public void initialize(PageContext pc)
Description copied from interface: Scope
Initalize Scope

Specified by:
initialize in interface Scope
Overrides:
initialize in class ScopeSupport
Parameters:
pc - Page Context
See Also:
Scope.initialize(railo.runtime.PageContext)

release

public void release()
Description copied from interface: Scope
release scope for reuse

Specified by:
release in interface Scope
Overrides:
release in class ScopeSupport
See Also:
ScopeSupport.release()

isScriptProtected

public boolean isScriptProtected()
Specified by:
isScriptProtected in interface ScriptProtected
Returns:
returns if the values of the scope are already protected against cross site scripting
See Also:
ScriptProtected.isScriptProtected()

setScriptProtecting

public void setScriptProtecting(boolean scriptProtected)
Description copied from interface: ScriptProtected
transform the string values of the scope do a script protecting way

Specified by:
setScriptProtecting in interface ScriptProtected
See Also:
ScriptProtected.setScriptProtecting(boolean)

dec

public String dec(String str)

enc

public String enc(String str)


Copyright © 2012 Railo