|
||||||||||
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.scope.storage.StorageScopeImpl
public abstract class StorageScopeImpl
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 Collection.Key |
CFID
|
static Collection.Key |
CFTOKEN
|
static Collection.Key |
HITCOUNT
|
static Collection.Key |
LASTVISIT
|
static Collection.Key |
SESSION_ID
|
static Collection.Key |
TIMECREATED
|
static Collection.Key |
URLTOKEN
|
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 |
Constructor Summary | |
---|---|
StorageScopeImpl(StorageScopeImpl other,
boolean deepCopy)
Constructor of the class |
|
StorageScopeImpl(Struct sct,
DateTime timecreated,
DateTime _lastvisit,
long lastvisit,
int hitcount,
String strType,
int type)
Constructor of the class |
Method Summary | |
---|---|
int |
_getId()
|
Boolean |
castToBoolean(Boolean defaultValue)
cast the castable value to a boolean value |
boolean |
castToBooleanValue()
cast the castable value to a boolean value |
DateTime |
castToDateTime()
cast the castable value to a date time object |
DateTime |
castToDateTime(DateTime defaultValue)
cast the castable value to a date time object |
double |
castToDoubleValue()
cast the castable value to a double value |
double |
castToDoubleValue(double defaultValue)
cast the castable value to a double value |
String |
castToString()
cast the castable value to a string, other than the Method toString, this Method can throw a Exception |
String |
castToString(String defaultValue)
cast the castable value to a string, return the default value, when the method is not castable |
void |
clear()
clears the collection |
int |
compareTo(boolean b)
|
int |
compareTo(DateTime dt)
|
int |
compareTo(double d)
|
int |
compareTo(String str)
|
boolean |
containsKey(Collection.Key key)
contains this key |
boolean |
containsValue(Object value)
|
static String |
decode(String input)
|
static String |
encode(String input)
|
Iterator<Map.Entry<Collection.Key,Object>> |
entryIterator()
|
String |
generateToken(String key,
boolean forceNew)
|
Object |
get(Collection.Key key)
return a value from the collection |
Object |
get(Collection.Key key,
Object defaultValue)
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null |
long |
getCreated()
|
long |
getLastAccess()
|
int |
getMaxInactiveInterval()
Returns the maximum time interval, in seconds, that the servlet container will keep this session open between client accesses. |
String |
getStorage()
return the name of the storage used, this is not the storage type! |
long |
getTimeSpan()
|
int |
getType()
|
String |
getTypeAsString()
|
boolean |
hasChanges()
|
boolean |
hasContent()
|
void |
initialize(PageContext pc)
Initalize Scope |
boolean |
isExpired()
|
boolean |
isInitalized()
return if the scope is Initialiesd |
Iterator<Collection.Key> |
keyIterator()
|
Collection.Key[] |
keys()
|
Iterator<String> |
keysAsStringIterator()
|
long |
lastVisit()
|
Collection.Key[] |
pureKeys()
|
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 |
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 |
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 |
setMaxInactiveInterval(int interval)
Specifies the time, in seconds, between client requests before the servlet container will invalidate this session. |
void |
setStorage(String storage)
sets the name of the storage used, this is not the storage type! |
int |
size()
|
long |
sizeOf()
return the size of the object |
void |
store(Config config)
store content on persistent layer |
DumpData |
toDumpData(PageContext pageContext,
int maxlevel,
DumpProperties dp)
method to print out information to a object as HTML |
void |
touch()
|
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 |
void |
unstore(Config config)
remove stored data from persistent layer |
Iterator<Object> |
valueIterator()
|
Collection |
values()
|
boolean |
verifyToken(String token,
String key)
|
Methods inherited from class railo.runtime.type.util.StructSupport |
---|
call, callWithNamedValues, clone, containsKey, containsKey, entrySet, equals, get, get, get, get, get, getIterator, hashCode, 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.storage.StorageScope |
---|
getStorageType |
Methods inherited from interface railo.runtime.type.Collection |
---|
clone, containsKey, duplicate, get, get, set, setEL |
Methods inherited from interface railo.runtime.type.ForEachIteratorable |
---|
getIterator |
Methods inherited from interface java.util.Map |
---|
containsKey, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove |
Methods inherited from interface railo.runtime.type.Objects |
---|
call, callWithNamedValues, get, get, set, setEL |
Field Detail |
---|
public static Collection.Key CFID
public static Collection.Key CFTOKEN
public static Collection.Key URLTOKEN
public static Collection.Key LASTVISIT
public static Collection.Key HITCOUNT
public static Collection.Key TIMECREATED
public static Collection.Key SESSION_ID
Constructor Detail |
---|
public StorageScopeImpl(Struct sct, DateTime timecreated, DateTime _lastvisit, long lastvisit, int hitcount, String strType, int type)
sct
- timecreated
- _lastvisit
- lastvisit
- hitcount
- public StorageScopeImpl(StorageScopeImpl other, boolean deepCopy)
other
- deepCopy
- Method Detail |
---|
public void touchBeforeRequest(PageContext pc)
SharedScope
touchBeforeRequest
in interface SharedScope
pc
- Page Contextpublic void resetEnv(PageContext pc)
public void setMaxInactiveInterval(int interval)
StorageScope
setMaxInactiveInterval
in interface StorageScope
interval
- - An integer specifying the number of secondspublic int getMaxInactiveInterval()
StorageScope
getMaxInactiveInterval
in interface StorageScope
public final boolean isInitalized()
Scope
isInitalized
in interface Scope
public final void initialize(PageContext pc)
Scope
initialize
in interface Scope
pc
- Page Contextpublic void touchAfterRequest(PageContext pc)
SharedScope
touchAfterRequest
in interface SharedScope
public final void release()
Scope
release
in interface Scope
public final void release(PageContext pc)
Scope
release
in interface Scope
public boolean hasContent()
public void clear()
Collection
clear
in interface Map
clear
in interface Collection
public boolean containsKey(Collection.Key key)
Collection
containsKey
in interface Collection
public Object get(Collection.Key key) throws PageException
Collection
get
in interface Collection
key
- key of the value to get must be lower case
PageException
public Object get(Collection.Key key, Object defaultValue)
Collection
get
in interface Collection
key
- key of the value to get
public Iterator<Collection.Key> keyIterator()
keyIterator
in interface Iteratorable
public Iterator<String> keysAsStringIterator()
keysAsStringIterator
in interface Iteratorable
keysAsStringIterator
in class StructSupport
public Iterator<Map.Entry<Collection.Key,Object>> entryIterator()
entryIterator
in interface Iteratorable
public Iterator<Object> valueIterator()
valueIterator
in interface Iteratorable
public Collection.Key[] keys()
keys
in interface Collection
public Object remove(Collection.Key key) throws PageException
Collection
remove
in interface Collection
key
- key of the collection
PageException
public Object removeEL(Collection.Key key)
Collection
removeEL
in interface Collection
key
- key of the collection
public Object set(Collection.Key key, Object value) throws PageException
Collection
set
in interface Collection
key
- key of the new valuevalue
- value to set
PageException
public Object setEL(Collection.Key key, Object value)
Collection
setEL
in interface Collection
key
- key of the value to getvalue
- value to set
public int size()
size
in interface Map
size
in interface Collection
public boolean castToBooleanValue() throws PageException
Castable
castToBooleanValue
in interface Castable
castToBooleanValue
in class StructSupport
PageException
public Boolean castToBoolean(Boolean defaultValue)
Castable
castToBoolean
in interface Castable
castToBoolean
in class StructSupport
public DateTime castToDateTime() throws PageException
Castable
castToDateTime
in interface Castable
castToDateTime
in class StructSupport
PageException
public DateTime castToDateTime(DateTime defaultValue)
Castable
castToDateTime
in interface Castable
castToDateTime
in class StructSupport
defaultValue
- returned when it is not possible to cast to a dateTime object
public double castToDoubleValue() throws PageException
Castable
castToDoubleValue
in interface Castable
castToDoubleValue
in class StructSupport
PageException
public double castToDoubleValue(double defaultValue)
Castable
castToDoubleValue
in interface Castable
castToDoubleValue
in class StructSupport
public String castToString() throws PageException
Castable
castToString
in interface Castable
castToString
in class StructSupport
PageException
public String castToString(String defaultValue)
Castable
castToString
in interface Castable
castToString
in class StructSupport
public int compareTo(boolean b) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
public int compareTo(DateTime dt) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
public int compareTo(double d) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
public int compareTo(String str) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
public long lastVisit()
lastVisit
in interface StorageScope
public Collection.Key[] pureKeys()
public void store(Config config)
StorageScope
store
in interface StorageScope
public void unstore(Config config)
StorageScope
unstore
in interface StorageScope
public boolean hasChanges()
public boolean containsValue(Object value)
containsValue
in interface Map
containsValue
in class StructSupport
public Collection values()
values
in interface Map
values
in class StructSupport
public long sizeOf()
Sizeable
sizeOf
in interface Sizeable
sizeOf
in class StructSupport
public final int getType()
getType
in interface Scope
public final String getTypeAsString()
getTypeAsString
in interface Scope
public final DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
Dumpable
toDumpData
in interface Dumpable
toDumpData
in class StructSupport
public long getLastAccess()
getLastAccess
in interface StorageScope
public long getTimeSpan()
getTimeSpan
in interface StorageScope
public void touch()
touch
in interface StorageScope
public boolean isExpired()
isExpired
in interface StorageScope
public void setStorage(String storage)
StorageScope
setStorage
in interface StorageScope
public String getStorage()
StorageScope
getStorage
in interface StorageScope
public static String encode(String input)
public static String decode(String input)
public int _getId()
public long getCreated()
getCreated
in interface StorageScope
public String generateToken(String key, boolean forceNew)
generateToken
in interface StorageScope
public boolean verifyToken(String token, String key)
verifyToken
in interface StorageScope
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |