Class DefaultUserAccess
java.lang.Object
org.eclnt.jsfserver.util.useraccess.DefaultUserAccess
- All Implemented Interfaces:
IUserAccess
Default implementation of
You can either associate a user with the current session by calling
Or you may associate a user with the current thread by calling
If no user is associated with the current session/thread then
IUserAccess
.You can either associate a user with the current session by calling
associateUserWithCurrentSession(String)
.
Or you may associate a user with the current thread by calling
associateUserWithCurrentThread(String)
.
If no user is associated with the current session/thread then
IUserAccess.USER_UNDEFINED
is returned as
current user.-
Field Summary
Fields inherited from interface org.eclnt.jsfserver.util.useraccess.IUserAccess
USER_UNDEFINED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
associateUserWithCurrentSession
(String userName) Pass the current user into the current session.static void
associateUserWithCurrentSession
(javax.servlet.http.HttpServletRequest request, String userName) Pass the current user into the current session.static void
static void
static void
Get user that is associated with the current context.getCurrentUser
(javax.faces.context.FacesContext context)
-
Constructor Details
-
DefaultUserAccess
public DefaultUserAccess()
-
-
Method Details
-
getCurrentUser
Description copied from interface:IUserAccess
Get user that is associated with the current context.- Specified by:
getCurrentUser
in interfaceIUserAccess
-
getCurrentUser
-
associateUserWithCurrentSession
Pass the current user into the current session.
This method expects to be run as part of the CC-/JSF-Roundtrip processing. This method will fail if you call it from some Servlet-Filter-processing which is processed in front of the CC-/JSF-Roundtrip processing. Use methodassociateUserWithCurrentSession(HttpServletRequest, String)
in this case. -
associateUserWithCurrentSession
public static void associateUserWithCurrentSession(javax.servlet.http.HttpServletRequest request, String userName) Pass the current user into the current session.
Special implementation which is used in case you want to pass the information from some filter processing, which is arranged in front of the CC-filter processing. -
clearUserWithCurrentSession
public static void clearUserWithCurrentSession() -
associateUserWithCurrentThread
-
clearUserWithCurrentThread
public static void clearUserWithCurrentThread()
-