public class RequestScope extends AbstractMapBasedScope implements IRequestScope
m_aRWLock| Constructor and Description |
|---|
RequestScope(String sScopeID,
String sSessionID) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAttributeValues(String sName)
Get a list of all attribute values with the same name.
|
List<String> |
getAttributeValues(String sName,
List<String> aDefault)
Get a list of all attribute values with the same name.
|
String |
getSessionID()
Shortcut for
getSessionID(true) |
String |
getSessionID(boolean bCreateIfNotExisting) |
boolean |
hasAttributeValue(String sName,
String sDesiredValue)
Check if a attribute with the given name is present in the request and has
the specified value.
|
boolean |
hasAttributeValue(String sName,
String sDesiredValue,
boolean bDefault)
Check if a attribute with the given name is present in the request and has
the specified value.
|
void |
initScope()
Init the scope.
|
protected void |
postDestroy()
Override this method to perform further actions AFTER the scope was
destroyed.
|
protected void |
preDestroy()
Override this method to perform further actions BEFORE the scope is
destroyed.
|
String |
toString() |
destroyOwnedScopes, destroyScope, equals, getAllScopeRenewalAwareAttributes, getID, hashCode, isDestroyed, isInDestruction, isValid, runAtomic, runAtomicclear, containsAttribute, containsNoAttribute, getAllAttributeNames, getAllAttributes, getAllAttributeValues, getAndSetAttributeFlag, getAttributeCount, getAttributeNames, getAttributeObject, getClone, removeAttribute, setAttributesetAttribute, setAttribute, setAttribute, setAttributeonBeforeRemoveAttribute, onBeforeSetAttributeValue, setAttributes, setAttributesgetAsBigDecimal, getAsBigInteger, getAsBoolean, getAsDouble, getAsInt, getAsLong, getAsString, getAttributeAsBigDecimal, getAttributeAsBigDecimal, getAttributeAsBigInteger, getAttributeAsBigInteger, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsInt, getAttributeAsInt, getAttributeAsLong, getAttributeAsLong, getAttributeAsString, getAttributeAsString, getCastedAttribute, getCastedAttribute, getTypedAttribute, getTypedAttributeclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroyScope, getAllScopeRenewalAwareAttributes, getID, isDestroyed, isInDestruction, isValid, runAtomic, runAtomicgetAndSetAttributeFlag, setAttribute, setAttribute, setAttribute, setAttributeremoveAttribute, setAttribute, setAttributes, setAttributescontainsAttribute, containsNoAttribute, getAllAttributeNames, getAllAttributes, getAllAttributeValues, getAttributeAsBigDecimal, getAttributeAsBigDecimal, getAttributeAsBigInteger, getAttributeAsBigInteger, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsInt, getAttributeAsInt, getAttributeAsLong, getAttributeAsLong, getAttributeAsString, getAttributeAsString, getAttributeCount, getAttributeNames, getAttributeObject, getCastedAttribute, getCastedAttribute, getTypedAttribute, getTypedAttributeclear@Nonnull @Nonempty public final String getSessionID()
IRequestScopegetSessionID(true)getSessionID in interface IRequestScopenull if no session ID is present and no session should
be created.@Nonnull @Nonempty public final String getSessionID(boolean bCreateIfNotExisting)
getSessionID in interface IRequestScopebCreateIfNotExisting - if true a session ID is created if needednull if no session ID is present and no session should
be created.public void initScope()
IScopeprotected void preDestroy()
AbstractMapBasedScopepreDestroy in class AbstractMapBasedScopeprotected void postDestroy()
AbstractMapBasedScopepostDestroy in class AbstractMapBasedScope@Nullable public List<String> getAttributeValues(@Nullable String sName)
IRequestScopegetAttributeValues in interface IRequestScopesName - The name of the attribute to query.null if no such attribute value exists@Nullable public List<String> getAttributeValues(@Nullable String sName, @Nullable List<String> aDefault)
IRequestScopegetAttributeValues in interface IRequestScopesName - The name of the attribute to query.aDefault - The default value to be returned, if no such attribute is present.aDefault if no such attribute value existspublic boolean hasAttributeValue(@Nullable String sName, @Nullable String sDesiredValue)
IRequestScopehasAttributeValue in interface IRequestScopesName - The name of the attribute to checksDesiredValue - The value to be matchedtrue if an attribute with the given name is present
and has the desired valuepublic boolean hasAttributeValue(@Nullable String sName, @Nullable String sDesiredValue, boolean bDefault)
IRequestScopehasAttributeValue in interface IRequestScopesName - The name of the attribute to checksDesiredValue - The value to be matchedbDefault - the default value to be returned, if the specified attribute is not
presenttrue if an attribute with the given name is present
and has the desired value, false if the attribute is
present but has a different value. If the attribute is not present,
the default value is returned.public String toString()
toString in class AbstractMapBasedScopeCopyright © 2014–2015 Philip Helger. All rights reserved.