org.infoglue.cms.applications.common
Class Session

java.lang.Object
  |
  +--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)

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.
 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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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.


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.

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