|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.entitybroker.util.request.RequestStorageImpl
public class RequestStorageImpl
Impl for the request store, will store values in the request itself and will maintain a map of all request values in a threadlocal which should always be cleared at the end of the request
| Nested Class Summary | |
|---|---|
static class |
RequestStorageImpl.EntryComparator
|
| Nested classes/interfaces inherited from interface org.sakaiproject.entitybroker.entityprovider.extension.RequestStorage |
|---|
RequestStorage.RequestOrigin, RequestStorage.ReservedKeys |
| Constructor Summary | |
|---|---|
protected |
RequestStorageImpl()
|
|
RequestStorageImpl(RequestGetter requestGetter)
|
| Method Summary | ||
|---|---|---|
protected Map<String,Object> |
getAllRequestValues()
|
|
protected HashMap<String,Object> |
getInternalMap()
|
|
protected Object |
getRequestValue(String key)
|
|
protected Map<String,Object> |
getRequestValues(boolean includeHeaders,
boolean includeParams,
boolean includeAttributes)
|
|
static Map<String,Object> |
getRequestValues(javax.servlet.http.HttpServletRequest request,
boolean includeHeaders,
boolean includeParams,
boolean includeAttributes)
|
|
Map<String,Object> |
getStorageMapCopy()
|
|
Map<String,Object> |
getStorageMapCopy(boolean includeInternal,
boolean includeHeaders,
boolean includeParams,
boolean includeAttributes)
Special version which allows getting only the parts that are desired |
|
Object |
getStoredValue(String key)
|
|
|
getStoredValueAsType(Class<T> type,
String key)
|
|
boolean |
inRequest()
|
|
void |
reset()
Resets the request storage and purges all stored values (has no effect on the data in the request) |
|
void |
setRequestGetter(RequestGetter requestGetter)
|
|
void |
setRequestValue(String key,
Object value)
Allows user to set the value of a key directly, including reserved keys |
|
void |
setRequestValues(Map<String,Object> params)
Place all these params into the request storage |
|
void |
setStoredValue(String key,
Object value)
|
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected RequestStorageImpl()
public RequestStorageImpl(RequestGetter requestGetter)
| Method Detail |
|---|
protected HashMap<String,Object> getInternalMap()
public void setRequestGetter(RequestGetter requestGetter)
public boolean inRequest()
public Map<String,Object> getStorageMapCopy()
getStorageMapCopy in interface RequestStoragepublic Object getStoredValue(String key)
getStoredValue in interface RequestStorage
public Map<String,Object> getStorageMapCopy(boolean includeInternal,
boolean includeHeaders,
boolean includeParams,
boolean includeAttributes)
getStorageMapCopy in interface RequestStorageincludeInternal - include the internal request valuesincludeHeaders - include the request headersincludeParams - include the request parametersincludeAttributes - include the request attributes
public <T> T getStoredValueAsType(Class<T> type,
String key)
getStoredValueAsType in interface RequestStorage
public void setStoredValue(String key,
Object value)
setStoredValue in interface RequestStorageWritepublic void reset()
reset in interface RequestStorageWrite
public void setRequestValue(String key,
Object value)
setRequestValue in interface RequestStorageWritekey - value - public void setRequestValues(Map<String,Object> params)
setRequestValues in interface RequestStorageWriteparams - map of string -> valueprotected Object getRequestValue(String key)
protected Map<String,Object> getAllRequestValues()
protected Map<String,Object> getRequestValues(boolean includeHeaders,
boolean includeParams,
boolean includeAttributes)
public String toString()
toString in class Object
public static Map<String,Object> getRequestValues(javax.servlet.http.HttpServletRequest request,
boolean includeHeaders,
boolean includeParams,
boolean includeAttributes)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||