Interface CmsSessionContext


public interface CmsSessionContext
Provides access to CMS Application Session Context specific information
  • Field Details

    • 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:
    • LOCALE

      static final String LOCALE
      Key to retrieve the locale applicable to the current CMS session.
      See Also:
    • TIME_ZONE

      static final String TIME_ZONE
      Key to retrieve the time zone applicable to the current CMS session.
      See Also:
    • CMS_SESSION_CONTEXT_PAYLOAD_KEY

      static final String CMS_SESSION_CONTEXT_PAYLOAD_KEY
      Key to retrieve the context payload
  • Method Details

    • getContext

      static CmsSessionContext getContext(jakarta.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