类 DefaultSessionAttributeStore
java.lang.Object
cn.taketoday.web.bind.support.DefaultSessionAttributeStore
- 所有已实现的接口:
SessionAttributeStore
Default implementation of the
SessionAttributeStore interface,
storing the attributes in the RequestContext session (i.e. HttpSession).- 从以下版本开始:
- 4.0 2022/4/8 23:20
- 作者:
- Juergen Hoeller, Harry Yang
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidcleanupAttribute(RequestContext request, String attributeName) Clean up the specified attribute in the backend session.protected StringgetAttributeNameInSession(RequestContext request, String attributeName) Calculate the attribute name in the backend session.private WebSessiongetSession(RequestContext request) retrieveAttribute(RequestContext request, String attributeName) Retrieve the specified attribute from the backend session.voidsetAttributeNamePrefix(String attributeNamePrefix) Specify a prefix to use for the attribute names in the backend session.voidsetSessionManager(SessionManager sessionManager) voidstoreAttribute(RequestContext request, String attributeName, Object attributeValue) Store the supplied attribute in the backend session.
-
字段详细资料
-
attributeNamePrefix
-
sessionManager
-
-
构造器详细资料
-
DefaultSessionAttributeStore
public DefaultSessionAttributeStore()
-
-
方法详细资料
-
setAttributeNamePrefix
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
从接口复制的说明:SessionAttributeStoreStore 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.
- 指定者:
storeAttribute在接口中SessionAttributeStore- 参数:
request- the current requestattributeName- the name of the attributeattributeValue- the attribute value to store
-
retrieveAttribute
从接口复制的说明:SessionAttributeStoreRetrieve 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.- 指定者:
retrieveAttribute在接口中SessionAttributeStore- 参数:
request- the current requestattributeName- the name of the attribute- 返回:
- the current attribute value, or
nullif none
-
cleanupAttribute
从接口复制的说明:SessionAttributeStoreClean up the specified attribute in the backend session.Indicates that the attribute name will not be used anymore.
- 指定者:
cleanupAttribute在接口中SessionAttributeStore- 参数:
request- the current requestattributeName- the name of the attribute
-
getAttributeNameInSession
Calculate the attribute name in the backend session.The default implementation simply prepends the configured
"attributeNamePrefix", if any.- 参数:
request- the current requestattributeName- the name of the attribute- 返回:
- the attribute name in the backend session
-
getSession
-
setSessionManager
-