|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.www.WebSessionUtils
public final class WebSessionUtils
Collection of useful methods to work with sessions objects.
| Field Summary | |
|---|---|
static java.lang.String |
HTTP_SESSION_TRACKER
Object which tracks when the session is invalidated by the web container. |
static java.lang.String |
INTERNAL_SESSIONID_SESSION_PARAM
Name of the attribute in the session containing the internal session id. |
static java.lang.String |
LOGGEDIN_USERID_SESSION_PARAM
Identification of logged in user. |
| Method Summary | |
|---|---|
static java.security.Principal |
getLoggedInUserInfo(javax.servlet.http.HttpSession hsSession)
If the user has logged in, this method will return information about who is logged in. |
static java.lang.String |
getSessionId(javax.servlet.http.HttpSession hsSession)
Get identifier of current user session. |
static boolean |
isLoggedIn(javax.servlet.http.HttpSession hsSession)
If the user has logged in, this method will return true. |
static void |
resetSessionAndUserInfo(javax.servlet.http.HttpSession hsSession)
Reset identifier of current user session and user information. |
static void |
setSessionAndUserInfo(javax.servlet.http.HttpSession hsSession,
java.lang.String sessionId,
java.security.Principal credentials)
Set identifier of current user session and user information |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String INTERNAL_SESSIONID_SESSION_PARAM
public static final java.lang.String LOGGEDIN_USERID_SESSION_PARAM
public static final java.lang.String HTTP_SESSION_TRACKER
| Method Detail |
|---|
public static boolean isLoggedIn(javax.servlet.http.HttpSession hsSession)
hsSession - - HTTP session object, can be null
public static java.security.Principal getLoggedInUserInfo(javax.servlet.http.HttpSession hsSession)
hsSession - - HTTP session object, can be null
public static java.lang.String getSessionId(javax.servlet.http.HttpSession hsSession)
hsSession - - current HTTP session user is using
public static void setSessionAndUserInfo(javax.servlet.http.HttpSession hsSession,
java.lang.String sessionId,
java.security.Principal credentials)
hsSession - - current HTTP session user is usingsessionId - - user session identifiercredentials - - credentials for userpublic static void resetSessionAndUserInfo(javax.servlet.http.HttpSession hsSession)
hsSession - - current HTTP session user is using
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||