|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.runtime.type.util.StructSupport
railo.runtime.type.StructImpl
railo.runtime.type.scope.ScopeSupport
railo.runtime.type.scope.CookieImpl
public final class CookieImpl
Implementation of the Cookie scope
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 interface railo.runtime.type.scope.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_VAR, SCOPE_VARIABLES |
Fields inherited from interface railo.runtime.type.Struct |
---|
TYPE_LINKED, TYPE_REGULAR, TYPE_SOFT, 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 |
static boolean |
isHTTPOnly(javax.servlet.http.Cookie cookie)
|
boolean |
isScriptProtected()
|
void |
release()
release scope for reuse |
void |
release(PageContext pc)
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 |
removeEL(Collection.Key key)
removes value from collection and return it when it exists, otherwise returns null |
void |
resetEnv(PageContext pc)
|
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,
int expires,
boolean secure,
String path,
String domain,
boolean httpOnly,
boolean preserveCase,
boolean encode)
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(Collection.Key key,
Object value,
Object expires,
boolean secure,
String path,
String domain,
boolean httpOnly,
boolean preserveCase,
boolean encode)
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(Collection.Key key,
Object value,
int expires,
boolean secure,
String path,
String domain,
boolean httpOnly,
boolean preserveCase,
boolean encode)
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 |
static void |
setHTTPOnly(javax.servlet.http.Cookie cookie)
|
void |
setScriptProtecting(ApplicationContext ac,
boolean scriptProtected)
transform the string values of the scope do a script protecting way |
void |
touchAfterRequest(PageContext pc)
release scope only for current request, scope will be used again |
void |
touchBeforeRequest(PageContext pc)
Initalize Scope only for this request, scope was already used |
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, entryIterator, equals, g, g, get, get, hashCode, keyIterator, keys, keysAsStringIterator, size, valueIterator, values |
Methods inherited from class railo.runtime.type.util.StructSupport |
---|
call, callWithNamedValues, castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, clone, compareTo, compareTo, compareTo, compareTo, containsKey, containsKey, entrySet, get, get, get, get, get, getIterator, invalidKey, isEmpty, keySet, put, putAll, remove, set, set, setEL, setEL, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface railo.runtime.type.scope.Scope |
---|
getType, getTypeAsString, isInitalized |
Methods inherited from interface railo.runtime.type.Collection |
---|
clone, containsKey, containsKey, duplicate, get, get, get, get, keys, set, setEL, size |
Methods inherited from interface railo.runtime.type.Iteratorable |
---|
entryIterator, keyIterator, keysAsStringIterator, valueIterator |
Methods inherited from interface railo.runtime.type.ForEachIteratorable |
---|
getIterator |
Methods inherited from interface java.util.Map |
---|
containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from interface railo.runtime.type.Sizeable |
---|
sizeOf |
Methods inherited from interface railo.runtime.type.Objects |
---|
call, callWithNamedValues, get, get, set, setEL |
Methods inherited from interface railo.runtime.dump.Dumpable |
---|
toDumpData |
Methods inherited from interface railo.runtime.op.Castable |
---|
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, compareTo, compareTo, compareTo, compareTo |
Field Detail |
---|
public static final int NEVER
Constructor Detail |
---|
public CookieImpl()
Method Detail |
---|
public Object setEL(Collection.Key key, Object value)
Collection
setEL
in interface Collection
setEL
in class StructImpl
key
- key of the value to getvalue
- value to set
public Object set(Collection.Key key, Object value) throws PageException
Collection
set
in interface Collection
set
in class StructImpl
key
- key of the new valuevalue
- value to set
PageException
public void clear()
Collection
clear
in interface Map
clear
in interface Collection
clear
in class StructImpl
public Object remove(Collection.Key key) throws PageException
Collection
remove
in interface Collection
remove
in class StructImpl
key
- key of the collection
PageException
public Object remove(Collection.Key key, boolean alsoInResponse) throws PageException
PageException
public Object removeEL(Collection.Key key)
Collection
removeEL
in interface Collection
removeEL
in class StructImpl
key
- key of the collection
public void setCookie(Collection.Key key, Object value, Object expires, boolean secure, String path, String domain) throws PageException
Cookie
setCookie
in interface Cookie
key
- name of the cookievalue
- value of the cookieexpires
- expirs of the cookie (Date, number in seconds or keyword as string )secure
- set secure or notpath
- path of the cookiedomain
- domain of the cookie
PageException
public void setCookie(Collection.Key key, Object value, int expires, boolean secure, String path, String domain) throws PageException
Cookie
setCookie
in interface Cookie
key
- Name of the cookievalue
- value of the cookieexpires
- expires in secondssecure
- secute or notpath
- path of the cookiedomain
- domain of the cookie
PageException
public void setCookieEL(Collection.Key key, Object value, int expires, boolean secure, String path, String domain)
Cookie
setCookieEL
in interface Cookie
key
- Name of the cookievalue
- value of the cookieexpires
- expires in secondssecure
- secute or notpath
- path of the cookiedomain
- domain of the cookiepublic void setCookie(Collection.Key key, Object value, Object expires, boolean secure, String path, String domain, boolean httpOnly, boolean preserveCase, boolean encode) throws PageException
Cookie
setCookie
in interface Cookie
key
- name of the cookievalue
- value of the cookieexpires
- expirs of the cookie (Date, number in seconds or keyword as string )secure
- set secure or notpath
- path of the cookiedomain
- domain of the cookiehttpOnly
- if true, sets cookie as httponly so that it cannot be accessed using JavaScripts. Note that the browser must have httponly compatibility.preserveCase
- if true, keep the case of the name as it isencode
- if true, url encode the name and the value
PageException
public void setCookie(Collection.Key key, Object value, int expires, boolean secure, String path, String domain, boolean httpOnly, boolean preserveCase, boolean encode) throws PageException
Cookie
setCookie
in interface Cookie
key
- Name of the cookievalue
- value of the cookieexpires
- expires in secondssecure
- secute or notpath
- path of the cookiedomain
- domain of the cookiehttpOnly
- if true, sets cookie as httponly so that it cannot be accessed using JavaScripts. Note that the browser must have httponly compatibility.preserveCase
- if true, keep the case of the name as it isencode
- if true, url encode the name and the value
PageException
public void setCookieEL(Collection.Key key, Object value, int expires, boolean secure, String path, String domain, boolean httpOnly, boolean preserveCase, boolean encode)
Cookie
setCookieEL
in interface Cookie
key
- Name of the cookievalue
- value of the cookieexpires
- expires in secondssecure
- secute or notpath
- path of the cookiedomain
- domain of the cookiehttpOnly
- if true, sets cookie as httponly so that it cannot be accessed using JavaScripts. Note that the browser must have httponly compatibility.preserveCase
- if true, keep the case of the name as it isencode
- if true, url encode the name and the valuepublic void initialize(PageContext pc)
Scope
initialize
in interface Scope
initialize
in class ScopeSupport
pc
- Page Contextpublic void release()
Scope
release
in interface Scope
release
in class ScopeSupport
public void release(PageContext pc)
Scope
release
in interface Scope
release
in class ScopeSupport
public boolean isScriptProtected()
isScriptProtected
in interface ScriptProtected
public void setScriptProtecting(ApplicationContext ac, boolean scriptProtected)
ScriptProtected
setScriptProtecting
in interface ScriptProtected
public String dec(String str)
public String enc(String str)
public void resetEnv(PageContext pc)
resetEnv
in interface UserScope
public void touchBeforeRequest(PageContext pc)
SharedScope
touchBeforeRequest
in interface SharedScope
pc
- Page Contextpublic void touchAfterRequest(PageContext pc)
SharedScope
touchAfterRequest
in interface SharedScope
public static void setHTTPOnly(javax.servlet.http.Cookie cookie)
public static boolean isHTTPOnly(javax.servlet.http.Cookie cookie)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |