nl.gx.webmanager.springmvc
Class CmsItemPrivateSessionImpl

java.lang.Object
  extended by nl.gx.webmanager.springmvc.CmsItemPrivateSessionImpl
All Implemented Interfaces:
CmsItemPrivateSession

public class CmsItemPrivateSessionImpl
extends java.lang.Object
implements CmsItemPrivateSession

Provide an virtual Private http Session for an CmsItemBase Class.

Author:
johntd

Field Summary
protected static java.util.logging.Logger LOG
           
 
Constructor Summary
CmsItemPrivateSessionImpl(javax.servlet.http.HttpServletRequest request, java.lang.String componentId)
          Contruct a CmsItemPrivateSession instance.
 
Method Summary
 java.lang.String getAttribute(java.lang.String key)
          get the attribute value with the given key from the "Virtual Private Session"
 java.lang.String getGxInternalAttribute(java.lang.String key)
          get a GX framework internal attrubute from the "Virtual private Session"
 java.lang.String getInstanceAttribute(java.lang.String instanceId, java.lang.String key)
          get the attribute value with the given key from the "Virtual Private Session" from this specific instanceId.
 void setAttribute(java.lang.String key, java.lang.String value)
          store a String attribute on the "Virtual Private Session" with the given key
 void setGxInternalAttribute(java.lang.String key, java.lang.String value)
          set a GX framework internal attrubute from the "Virtual private Session".
 void setInstanceAttribute(java.lang.String instanceId, java.lang.String key, java.lang.String value)
          store a String attribute on the "Virtual Private Session" with the given key only visual for the given instanceId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final java.util.logging.Logger LOG
Constructor Detail

CmsItemPrivateSessionImpl

public CmsItemPrivateSessionImpl(javax.servlet.http.HttpServletRequest request,
                                 java.lang.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(java.lang.String key,
                         java.lang.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 java.lang.String getAttribute(java.lang.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(java.lang.String instanceId,
                                 java.lang.String key,
                                 java.lang.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 java.lang.String getInstanceAttribute(java.lang.String instanceId,
                                             java.lang.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 java.lang.String getGxInternalAttribute(java.lang.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(java.lang.String key,
                                   java.lang.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


Copyright © 2007-2011 GX Software BV. All Rights Reserved.