Interface CmsSessionContext


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

      • SESSION_KEY

        static final String SESSION_KEY
        Attribute name under which the CmsSessionContext is bind in its HttpSession
      • 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 javax.jcr.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