Class CmsItemPrivateSessionImpl

    • Field Detail

      • LOG

        protected static final Logger LOG
    • Constructor Detail

      • CmsItemPrivateSessionImpl

        public CmsItemPrivateSessionImpl​(javax.servlet.http.HttpServletRequest request,
                                         String componentId)
        Contruct a CmsItemPrivateSession instance. make sure that the provide privateSessionMap thread-safe and externaly handled thread-safe
        Parameters:
        privateSessionsMap - hold the values for this private session must be synchronized
    • Method Detail

      • setAttribute

        public void setAttribute​(String key,
                                 String value)
        store a String attribute on the "Virtual Private Session" with the given key
        Specified by:
        setAttribute in interface CmsItemPrivateSession
        Parameters:
        key - key may not start GX_ (framework internal)
        value - value to store
      • getAttribute

        public String getAttribute​(String key)
        get the attribute value with the given key from the "Virtual Private Session"
        Specified by:
        getAttribute in interface CmsItemPrivateSession
        Parameters:
        key -
        Returns:
        requested attribute value or null if not found
      • setInstanceAttribute

        public void setInstanceAttribute​(String instanceId,
                                         String key,
                                         String value)
        store a String attribute on the "Virtual Private Session" with the given key only visual for the given instanceId. This way attributes with the same key for multiple instances (f.e. values of an element instance, or usage of an "id" key on multiple tabs (user tabId form instanceId)
        Specified by:
        setInstanceAttribute in interface CmsItemPrivateSession
        Parameters:
        instanceId - instanceId may not start with GX_ (framework internal)
        key - key may not start with GX_ (framework internal)
        value - value to store
      • getInstanceAttribute

        public String getInstanceAttribute​(String instanceId,
                                           String key)
        get the attribute value with the given key from the "Virtual Private Session" from this specific instanceId.
        Specified by:
        getInstanceAttribute in interface CmsItemPrivateSession
        Parameters:
        instanceId -
        key -
        Returns:
        requested attribute value or null if not found
      • getGxInternalAttribute

        public String getGxInternalAttribute​(String key)
        get a GX framework internal attrubute from the "Virtual private Session"
        Parameters:
        key - key will be prefixed by this method for uniqueness
        Returns:
        attribute value, null is not excists
      • setGxInternalAttribute

        public void setGxInternalAttribute​(String key,
                                           String value)
        set a GX framework internal attrubute from the "Virtual private Session". GX internal uasge only
        Parameters:
        key - key will be prefixed by this method for uniqueness
        value - to store