open class SessionAttributesHandler
Manages controller-specific session attributes declared via SessionAttributes. Actual storage is delegated to a SessionAttributeStore instance.
When a controller annotated with @SessionAttributes adds attributes to its model, those attributes are checked against names and types specified via @SessionAttributes. Matching model attributes are saved in the HTTP session and remain there until the controller calls SessionStatus#setComplete().
Author
Rossen Stoyanchev
Author
Juergen Hoeller
Since
3.1
SessionAttributesHandler(handlerType: Class<*>, sessionAttributeStore: SessionAttributeStore)
Create a new instance for a controller type. Session attribute names and types are extracted from the |
open fun cleanupAttributes(request: WebRequest): Unit
Remove "known" attributes from the session, i.e. attributes listed by name in |
|
open fun hasSessionAttributes(): Boolean
Whether the controller represented by this instance has declared any session attributes through an SessionAttributes annotation. |
|
open fun isHandlerSessionAttribute(attributeName: String, attributeType: Class<*>): Boolean
Whether the attribute name or type match the names and types specified via Attributes successfully resolved through this method are "remembered" and subsequently used in |
|
open fun retrieveAttributes(request: WebRequest): MutableMap<String, Any>
Retrieve "known" attributes from the session, i.e. attributes listed by name in |
|
open fun storeAttributes(request: WebRequest, attributes: MutableMap<String, *>): Unit
Store a subset of the given attributes in the session. Attributes not declared as session attributes via |