org.objectweb.telosys.screen.env
Class ScreenSessionManager

java.lang.Object
  extended byorg.objectweb.telosys.screen.env.ScreenSessionManager

public final class ScreenSessionManager
extends java.lang.Object


Method Summary
static boolean closeScreenSession(javax.servlet.http.HttpServletRequest request)
          Close the Screen Session associated with a request
( close the screen session and remove it from HttpSession )
static ScreenSession findScreenSession(javax.servlet.http.HttpServletRequest request)
          Try to find the Screen Session associated with the current HTTP Session
Return null if ...
static ScreenSession findScreenSession(javax.servlet.http.HttpSession httpSession)
          Try to find the Screen Session associated with the current HTTP Session
Return null if ...
static ScreenSession findScreenSession(javax.servlet.jsp.PageContext pageContext)
          Try to find the Screen Session associated with the current HTTP Session
Return null if ...
static LoginUser findScreenSessionUser(javax.servlet.http.HttpServletRequest request)
          Return the LoginUser instance associated with the current ScreenSession.
static ScreenSession getCurrentScreenSession(javax.servlet.http.HttpServletRequest request)
          Returns the current ScreenSession associated with the given HttpRequest
or null if the HttpSession doesn't exist or if it doesn't contain a ScreenSession attribute
static ScreenSession getScreenSession(javax.servlet.http.HttpServletRequest request)
          Return the current Screen Session from the HttpRequest
create a "dummy session" if not found and authentication not required
static boolean openScreenSession(javax.servlet.http.HttpServletRequest request, LoginUser loginUser, IAppUser appUser)
          Open (create) a new Screen Session for a given user
( create a new HttpSession if it doesn't exist )
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findScreenSession

public static ScreenSession findScreenSession(javax.servlet.http.HttpServletRequest request)
Try to find the Screen Session associated with the current HTTP Session
Return null if ...
. the request parameter is null
. there's no http session
. there's no ScreenSession in the http session

Parameters:
request -
Returns:
ScreenSession instance or null

findScreenSession

public static ScreenSession findScreenSession(javax.servlet.http.HttpSession httpSession)
Try to find the Screen Session associated with the current HTTP Session
Return null if ...
. the http session parameter is null
. there's no ScreenSession in the http session

Parameters:
httpSession -
Returns:
ScreenSession instance or null

findScreenSession

public static ScreenSession findScreenSession(javax.servlet.jsp.PageContext pageContext)
Try to find the Screen Session associated with the current HTTP Session
Return null if ...
. the PageContext parameter is null
. there's no http session
. there's no ScreenSession in the http session

Parameters:
pageContext -
Returns:
ScreenSession instance or null

findScreenSessionUser

public static LoginUser findScreenSessionUser(javax.servlet.http.HttpServletRequest request)
Return the LoginUser instance associated with the current ScreenSession.
Return null if the ScreenSession doesn't exist or if there's no LoginUser in the ScreenSession

Parameters:
request -
Returns:
LoginUser instance or null

getCurrentScreenSession

public static ScreenSession getCurrentScreenSession(javax.servlet.http.HttpServletRequest request)
Returns the current ScreenSession associated with the given HttpRequest
or null if the HttpSession doesn't exist or if it doesn't contain a ScreenSession attribute

Parameters:
request -
Returns:
the ScreenSession instance ( or null )

getScreenSession

public static ScreenSession getScreenSession(javax.servlet.http.HttpServletRequest request)
Return the current Screen Session from the HttpRequest
create a "dummy session" if not found and authentication not required

Parameters:
request -
Returns:
ScreenSession instance (never null)

openScreenSession

public static boolean openScreenSession(javax.servlet.http.HttpServletRequest request,
                                        LoginUser loginUser,
                                        IAppUser appUser)
Open (create) a new Screen Session for a given user
( create a new HttpSession if it doesn't exist )

Parameters:
request -
loginUser -
appUser -
Returns:

closeScreenSession

public static boolean closeScreenSession(javax.servlet.http.HttpServletRequest request)
Close the Screen Session associated with a request
( close the screen session and remove it from HttpSession )

Parameters:
request -
Returns: