public class WebSessionFunctions
extends java.lang.Object
| Constructor and Description |
|---|
WebSessionFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearCurrentHttpServletRequest()
Unassigns the current thread from its current http servlet request.
|
static void |
clearSession(HttpSession session) |
static HttpServletRequest |
getCurrentHttpServletRequest()
Returns the http servlet request associated with the current thread, or
null if no request had been
stored. |
static HttpSession |
getCurrentHttpSession()
Returns the http session associated with the current thread.
|
static JaloSession |
getSession(HttpServletRequest request)
returns a JaloSession object.
|
static JaloSession |
getSession(HttpServletRequest request,
boolean skipSystemInitTest)
returns a JaloSession object.
|
static JaloSession |
getSession(java.util.Map connProp,
java.lang.String cookiename,
HttpSession session,
HttpServletRequest request,
HttpServletResponse response)
returns a JaloSession object
|
static JaloSession |
getSession(java.util.Map _connProp,
java.lang.String cookiename,
HttpSession session,
HttpServletRequest request,
HttpServletResponse response,
java.lang.Class sessionClass)
returns a JaloSession object
|
static JaloSession |
getSession(java.lang.String cookiename,
HttpSession session,
HttpServletRequest request,
HttpServletResponse response,
boolean skipSystemInitTest)
returns a JaloSession object
|
static JaloSession |
getSession(java.lang.String cookiename,
HttpSession session,
HttpServletRequest request,
HttpServletResponse response,
java.lang.Class sessionClass,
boolean skipSystemInitTest)
returns a JaloSession object
|
static void |
invalidateSession(HttpSession session)
Closes the HTTP and JaloSession (if one is present under key 'jalosession').
|
static void |
setCurrentHttpServletRequest(HttpServletRequest request)
Assigns the given http servlet request to this thread.
|
static JaloSession |
tryGetJaloSession(HttpSession session) |
public static HttpServletRequest getCurrentHttpServletRequest()
null if no request had been
stored.public static HttpSession getCurrentHttpSession()
null if no request had been assigned.public static void clearCurrentHttpServletRequest()
public static void setCurrentHttpServletRequest(HttpServletRequest request)
public static final void invalidateSession(HttpSession session)
public static final void clearSession(HttpSession session)
public static final JaloSession tryGetJaloSession(HttpSession session)
public static final JaloSession getSession(HttpServletRequest request) throws JaloConnectException, JaloSystemNotInitializedException
If you don't want to use cookies and are connecting to the local server, this is the preferred method to get or create a JaloSession object.
request - the HttpServletRequest objectJaloConnectException - in case of a connection errorJaloSystemNotInitializedException - in case the connection was successful but the system not yet initializedpublic static final JaloSession getSession(java.util.Map connProp, java.lang.String cookiename, HttpSession session, HttpServletRequest request, HttpServletResponse response) throws JaloSystemNotInitializedException
connProp - deprecated, use always NULL
cookiename - if null, no cookies are used, otherwise this is the cookiename that should be used.session - the HttpSession objectrequest - the HttpServletRequest objectresponse - the HttpServletRespone objectJaloSystemNotInitializedException - in case the connection was successful but the system not yet initializedpublic static final JaloSession getSession(java.util.Map _connProp, java.lang.String cookiename, HttpSession session, HttpServletRequest request, HttpServletResponse response, java.lang.Class sessionClass) throws JaloSystemNotInitializedException
_connProp - Deprecated, use always NULL
cookiename - if null, no cookies are used, otherwise this is the cookiename that should be used.session - the HttpSession objectrequest - the HttpServletRequest objectresponse - the HttpServletRespone objectsessionClass - the jalo class of the new session, if null JaloSession will be takenJaloSystemNotInitializedException - in case the connection was successful but the system not yet initializedpublic static final JaloSession getSession(HttpServletRequest request, boolean skipSystemInitTest) throws JaloConnectException, JaloSystemNotInitializedException
If you don't want to use cookies and are connecting to the local server, this is the preferred method to get or create a JaloSession object.
request - the HttpServletRequest objectskipSystemInitTest - is true, this metod will not execute a db statement in order to determine if the system is initializeJaloConnectException - in case of a connection errorJaloSystemNotInitializedException - in case the connection was successful but the system not yet initializedpublic static final JaloSession getSession(java.lang.String cookiename, HttpSession session, HttpServletRequest request, HttpServletResponse response, boolean skipSystemInitTest) throws JaloSystemNotInitializedException
cookiename - if null, no cookies are used, otherwise this is the cookiename that should be used.session - the HttpSession objectrequest - the HttpServletRequest objectresponse - the HttpServletRespone objectskipSystemInitTest - is true, this metod will not execute a db statement in order to determine if the system is initializeJaloSystemNotInitializedException - in case the connection was successful but the system not yet initializedpublic static final JaloSession getSession(java.lang.String cookiename, HttpSession session, HttpServletRequest request, HttpServletResponse response, java.lang.Class sessionClass, boolean skipSystemInitTest) throws JaloSystemNotInitializedException
cookiename - if null, no cookies are used, otherwise this is the cookiename that should be used.session - the HttpSession objectrequest - the HttpServletRequest objectresponse - the HttpServletRespone objectsessionClass - the jalo class of the new session, if null JaloSession will be takenskipSystemInitTest - is true, this metod will not execute a db statement in order to determine if the system is initializeJaloSystemNotInitializedException - in case the connection was successful but the system not yet initializedCopyright © 2018 SAP SE. All Rights Reserved.