Interface CmsSessionContext
public interface CmsSessionContext
Provides access to CMS Application Session Context specific information
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Key to retrieve the context payloadstatic final String
Key to retrieve the locale applicable to the current CMS session.static final String
Key to the the SimpleCredentials with which the CMS session authenticates with the Repository.static final String
Attribute name under which the CmsSessionContext is bind in its HttpSessionstatic final String
Key to retrieve the time zone applicable to the current CMS session. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve CMS Session Context specific information by keystatic CmsSessionContext
getContext
(jakarta.servlet.http.HttpSession session) Static method to retrieve the CmsSessionContext from a HttpSessiondefault Map<String,
Serializable> Returns a mutable map bound to the http session.getId()
default Locale
default SimpleCredentials
default TimeZone
-
Field Details
-
SESSION_KEY
Attribute name under which the CmsSessionContext is bind in its HttpSession -
REPOSITORY_CREDENTIALS
Key to the the SimpleCredentials with which the CMS session authenticates with the Repository. -
LOCALE
Key to retrieve the locale applicable to the current CMS session.- See Also:
-
TIME_ZONE
Key to retrieve the time zone applicable to the current CMS session.- See Also:
-
CMS_SESSION_CONTEXT_PAYLOAD_KEY
Key to retrieve the context payload
-
-
Method Details
-
getContext
Static method to retrieve the CmsSessionContext from a HttpSession- Parameters:
session
- the HttpSession- Returns:
- the CmsSessionContext bound to the provided HttpSession
-
getId
String getId()- Returns:
- Unique identifier for this CmsSessionContext
-
getCmsContextServiceId
String getCmsContextServiceId()- Returns:
- Unique identifier for the CmsContextService which created this CmsSessionContext
-
get
Retrieve CMS Session Context specific information by key- Parameters:
key
- the key of the information- Returns:
- the information
-
getRepositoryCredentials
- Returns:
- the SimpleCredentials with which the CMS session authenticates with the Repository
-
getLocale
- Returns:
- the Locale applicable to the current CMS session
-
getTimeZone
- Returns:
- the TimeZone applicable to the current CMS session
-
getContextPayload
Returns a mutable map bound to the http session. It can e.g. be used to manage user specific properties.- Returns:
- mutable map of properties bound to the http session
-