SessionAttributeStore interface,
storing the attributes in the WebRequest session (i.e. HttpSession).
setAttributeNamePrefix, org.springframework.web.context.request.WebRequest#setAttribute , org.springframework.web.context.request.WebRequest#getAttribute , org.springframework.web.context.request.WebRequest#removeAttribute
| Modifier and Type | Field and Description |
|---|---|
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cleanupAttribute(WebRequest
the current request request, String the name of the attribute attributeName)Implements org. |
| protected String | Returns: the attribute name in the backend sessionthe current request request, String the name of the attribute attributeName)Calculate the attribute name in the backend session. |
| public Object | retrieveAttribute(WebRequest
the current request request, String the name of the attribute attributeName)Implements org. |
| public void | setAttributeNamePrefix(String attributeNamePrefix)
Specify a prefix to use for the attribute names in the backend session. |
| public void | storeAttribute(WebRequest
the current request request, String the name of the attribute attributeName, Object the attribute value to store attributeValue)Implements org. |
| attributeNamePrefix | back to summary |
|---|---|
| private String attributeNamePrefix | |
| DefaultSessionAttributeStore | back to summary |
|---|---|
| public DefaultSessionAttributeStore() | |
| cleanupAttribute | back to summary |
|---|---|
| public void cleanupAttribute(WebRequest request, String attributeName) Implements org. Doc from org. Clean up the specified attribute in the backend session. Indicates that the attribute name will not be used anymore.
| |
| getAttributeNameInSession | back to summary |
|---|---|
| protected String getAttributeNameInSession(WebRequest request, String attributeName) Calculate the attribute name in the backend session. The default implementation simply prepends the configured
| |
| retrieveAttribute | back to summary |
|---|---|
| public Object retrieveAttribute(WebRequest request, String attributeName) Implements org. Doc from org. Retrieve the specified attribute from the backend session. This will typically be called with the expectation that the
attribute is already present, with an exception to be thrown
if this method returns
| |
| setAttributeNamePrefix | back to summary |
|---|---|
| public void setAttributeNamePrefix(String attributeNamePrefix) Specify a prefix to use for the attribute names in the backend session. Default is to use no prefix, storing the session attributes with the same name as in the model. | |
| storeAttribute | back to summary |
|---|---|
| public void storeAttribute(WebRequest request, String attributeName, Object attributeValue) Implements org. Doc from org. Store the supplied attribute in the backend session. Can be called for new attributes as well as for existing attributes. In the latter case, this signals that the attribute value may have been modified.
| |