public class RequestStorageImpl extends Object implements RequestStorageWrite
| Modifier and Type | Class and Description |
|---|---|
static class |
RequestStorageImpl.EntryComparator |
RequestStorage.RequestOrigin, RequestStorage.ReservedKeys| Modifier | Constructor and Description |
|---|---|
protected |
RequestStorageImpl() |
|
RequestStorageImpl(RequestGetter requestGetter) |
| Modifier and Type | Method and Description |
|---|---|
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(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) |
<T> T |
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() |
protected RequestStorageImpl()
public RequestStorageImpl(RequestGetter requestGetter)
public void setRequestGetter(RequestGetter requestGetter)
public boolean inRequest()
public Map<String,Object> getStorageMapCopy()
getStorageMapCopy in interface RequestStoragepublic Object getStoredValue(String key)
getStoredValue in interface RequestStoragepublic 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 attributespublic <T> T getStoredValueAsType(Class<T> type, String key)
getStoredValueAsType in interface RequestStoragepublic void setStoredValue(String key, Object value)
setStoredValue in interface RequestStorageWritepublic void reset()
reset in interface RequestStorageWritepublic 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 Map<String,Object> getRequestValues(boolean includeHeaders, boolean includeParams, boolean includeAttributes)
public static Map<String,Object> getRequestValues(HttpServletRequest request, boolean includeHeaders, boolean includeParams, boolean includeAttributes)
Copyright © 2007-2014 CARET, University of Cambridge. All Rights Reserved.