org.infoglue.cms.applications.common
Class Session

java.lang.Object
  extended by org.infoglue.cms.applications.common.Session

public class Session
extends java.lang.Object

Session wrapper to ease getting things out of the Session. Abstract it so that I can work well with a Map (for testing, or ActionContext.getSession()) or an HttpSession, but not rely on an HttpSession.

Author:
Patrik Nyborg, Frank Febbraro (frank@phase2technology.com)

Field Summary
static java.lang.String LOCALE
           
static java.lang.String TOOL_ID
           
 
Constructor Summary
Session()
           
Session(javax.servlet.http.HttpSession httpSession)
           
Session(java.util.Map session)
           
 
Method Summary
 InfoGluePrincipal getInfoGluePrincipal()
          Returns the InfoGlue principal associated with the current user and session.
 java.util.Locale getLocale()
          Returns the locale used for the session.
 java.lang.Integer getToolId()
          Returns the locale used for the session.
 SystemUser getUser()
          Returns the user of the session.
 void setInfoGluePrincipal(InfoGluePrincipal p)
          Sets the InfoGlue principal associated with the current user and session.
 void setLocale(java.util.Locale locale)
          Sets the locale used for the session.
 void setSystemUser(SystemUser systemUser)
          Sets the user of the session.
 void setToolId(java.lang.Integer toolId)
          Sets the locale used for the session.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOCALE

public static final java.lang.String LOCALE
See Also:
Constant Field Values

TOOL_ID

public static final java.lang.String TOOL_ID
See Also:
Constant Field Values
Constructor Detail

Session

public Session()

Session

public Session(java.util.Map session)

Session

public Session(javax.servlet.http.HttpSession httpSession)
Method Detail

getLocale

public final java.util.Locale getLocale()
Returns the locale used for the session.


getToolId

public final java.lang.Integer getToolId()
Returns the locale used for the session.


setLocale

public final void setLocale(java.util.Locale locale)
Sets the locale used for the session.

Parameters:
locale - the locale to use for the session.

setToolId

public final void setToolId(java.lang.Integer toolId)
Sets the locale used for the session.

Parameters:
locale - the locale to use for the session.

getUser

public final SystemUser getUser()
Returns the user of the session.

Returns:
the user of the session.

setSystemUser

public final void setSystemUser(SystemUser systemUser)
Sets the user of the session.

Parameters:
systemUser - the user of the session.

getInfoGluePrincipal

public InfoGluePrincipal getInfoGluePrincipal()
Returns the InfoGlue principal associated with the current user and session. TODO: Update InfoGlueAuthenticationFilter to use this Session Object

Returns:
the InfoGlue principal associated with the current user and session

setInfoGluePrincipal

public void setInfoGluePrincipal(InfoGluePrincipal p)
Sets the InfoGlue principal associated with the current user and session. TODO: Update InfoGlueAuthenticationFilter to use this Session Object


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005 InfoGlue.org All Rights Reserved.