Interface SessionAttributeStore
- All Known Implementing Classes:
DefaultSessionAttributeStore
public interface SessionAttributeStore
Strategy interface for storing model attributes in a backend session.
- Since:
- 2.5
- Author:
- Juergen Hoeller
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanupAttribute
(WebRequest request, String attributeName) Clean up the specified attribute in the backend session.retrieveAttribute
(WebRequest request, String attributeName) Retrieve the specified attribute from the backend session.void
storeAttribute
(WebRequest request, String attributeName, Object attributeValue) Store the supplied attribute in the backend session.
-
Method Details
-
storeAttribute
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.
- Parameters:
request
- the current requestattributeName
- the name of the attributeattributeValue
- the attribute value to store
-
retrieveAttribute
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
null
.- Parameters:
request
- the current requestattributeName
- the name of the attribute- Returns:
- the current attribute value, or
null
if none
-
cleanupAttribute
Clean up the specified attribute in the backend session.Indicates that the attribute name will not be used anymore.
- Parameters:
request
- the current requestattributeName
- the name of the attribute
-