Interface CmsSessionContext
-
public interface CmsSessionContext
Provides access to CMS Application Session Context specific information
-
-
Field Summary
Fields Modifier and Type Field Description static String
CMS_SESSION_CONTEXT_PAYLOAD_KEY
Key to retrieve the context payloadstatic String
LOCALE
Key to retrieve the locale applicable to the current CMS session.static String
REPOSITORY_CREDENTIALS
Key to the the SimpleCredentials with which the CMS session authenticates with the Repository.static String
SESSION_KEY
Attribute name under which the CmsSessionContext is bind in its HttpSessionstatic String
TIME_ZONE
Key to retrieve the time zone applicable to the current CMS session.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Object
get(String key)
Retrieve CMS Session Context specific information by keyString
getCmsContextServiceId()
static CmsSessionContext
getContext(javax.servlet.http.HttpSession session)
Static method to retrieve the CmsSessionContext from a HttpSessiondefault Map<String,Serializable>
getContextPayload()
Returns a mutable map bound to the http session.String
getId()
default Locale
getLocale()
default SimpleCredentials
getRepositoryCredentials()
default TimeZone
getTimeZone()
-
-
-
Field Detail
-
SESSION_KEY
static final String SESSION_KEY
Attribute name under which the CmsSessionContext is bind in its HttpSession
-
REPOSITORY_CREDENTIALS
static final String REPOSITORY_CREDENTIALS
Key to the the SimpleCredentials with which the CMS session authenticates with the Repository.- See Also:
getRepositoryCredentials()
, Constant Field Values
-
LOCALE
static final String LOCALE
Key to retrieve the locale applicable to the current CMS session.- See Also:
getLocale()
, Constant Field Values
-
TIME_ZONE
static final String TIME_ZONE
Key to retrieve the time zone applicable to the current CMS session.- See Also:
getLocale()
, Constant Field Values
-
CMS_SESSION_CONTEXT_PAYLOAD_KEY
static final String CMS_SESSION_CONTEXT_PAYLOAD_KEY
Key to retrieve the context payload
-
-
Method Detail
-
getContext
static CmsSessionContext getContext(javax.servlet.http.HttpSession session)
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
Object get(String key)
Retrieve CMS Session Context specific information by key- Parameters:
key
- the key of the information- Returns:
- the information
-
getRepositoryCredentials
default SimpleCredentials getRepositoryCredentials()
- Returns:
- the SimpleCredentials with which the CMS session authenticates with the Repository
-
getLocale
default Locale getLocale()
- Returns:
- the Locale applicable to the current CMS session
-
getTimeZone
default TimeZone getTimeZone()
- Returns:
- the TimeZone applicable to the current CMS session
-
getContextPayload
default Map<String,Serializable> 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
-
-