Interface RequestStorageWrite
-
- All Superinterfaces:
RequestStorage
public interface RequestStorageWrite extends RequestStorage
This allows write access to values which are stored in the current request thread, these values are inaccessible outside of a request and will be destroyed when the thread ends
This also "magically" exposes all the values in the request (attributes and params) as if they were stored in the map as well, if there are conflicts then locally stored data always wins over data from the request
Standard reserved keys have values that are always available:
- _locale :
Locale - _requestEntityReference : String
- _requestActive : [true,false]
- _requestOrigin : ['REST','EXTERNAL','INTERNAL']
- Author:
- Aaron Zeckoski (azeckoski @ gmail.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.sakaiproject.entitybroker.entityprovider.extension.RequestStorage
RequestStorage.RequestOrigin, RequestStorage.ReservedKeys
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidreset()Clear all values in the request storage (does not wipe the values form the request itself)voidsetRequestValue(String key, Object value)Allows user to set the value of a key directly, including reserved keysvoidsetRequestValues(Map<String,Object> params)Place all these params into the request storagevoidsetStoredValue(String key, Object value)Store a value in the request storage with an associated key-
Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.extension.RequestStorage
getStorageMapCopy, getStorageMapCopy, getStoredValue, getStoredValueAsType
-
-
-
-
Method Detail
-
setStoredValue
void setStoredValue(String key, Object value)
Store a value in the request storage with an associated key- Parameters:
key- a key for a stored valuevalue- an object to store- Throws:
IllegalArgumentException- if the key OR value are null, also if an attempt is made to change a reserved value (seeRequestStorageWrite)
-
setRequestValues
void setRequestValues(Map<String,Object> params)
Place all these params into the request storage- Parameters:
params- map of string -> value params- Throws:
IllegalArgumentException- if the key OR value are null, also if an attempt is made to change a reserved value (seeRequestStorageWrite)
-
setRequestValue
void setRequestValue(String key, Object value)
Allows user to set the value of a key directly, including reserved keys- Parameters:
key- the name of the valuevalue- the value to store- Throws:
IllegalArgumentException- if the key OR value are null, also if an attempt is made to change a reserved value (seeRequestStorageWrite)
-
reset
void reset()
Clear all values in the request storage (does not wipe the values form the request itself)
-
-