Package de.xima.fc.user
Class UserContextFactory
java.lang.Object
de.xima.fc.user.UserContextFactory
Factory methods for creating new
UserContext
instances.- Author:
- XIMA MEDIA GmbH
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic UserContext
Deprecated.static UserContext
Deprecated.UseforSystem()
instead.static UserContext
User context for thesystem user
with unmodifiableparameters
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UserContext
forBenutzer
(Benutzer ben) Deprecated.useforUser(IUser)
instead.static UserContext
forRequest
(javax.servlet.http.HttpServletRequest request) Deprecated.static UserContext
forRequest
(javax.servlet.http.HttpServletRequest request, boolean createSession) Deprecated.static UserContext
static UserContext
static UserContext
forWebContext
(javax.faces.context.FacesContext ctx, IAuthenticationTarget target) Reads the user from the given Faces context, and creates a new user context wrapper for that user.static UserContext
forWebContext
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, IAuthenticationTarget target) Reads the user from the given request and response, and creates a new user context wrapper for that user.static UserContext
forXfcSession
(XfcSession session) Deprecated.static UserContext
getNew()
Deprecated.UseANONYMOUS
-
Field Details
-
SYSTEM
User context for thesystem user
with unmodifiableparameters
. -
ANONYMOUS
Deprecated.An anonymous user context with the virtual userVirtualUser.ANONYMOUS
should never be used. UseforUser(IUser)
authenticated users orforSystem()
instead.User context for theanonymous user
with unmodifiableparameters
. -
SETUP
Deprecated.UseforSystem()
instead.
-
-
Constructor Details
-
UserContextFactory
public UserContextFactory()
-
-
Method Details
-
forSystem
- Returns:
- User context for the system user
VirtualUser.SYSTEM
.
-
forUser
- Parameters:
user
- The user to wrap.- Returns:
- A new modifiable user context for the given user.
-
forWebContext
public static UserContext forWebContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, IAuthenticationTarget target) Reads the user from the given request and response, and creates a new user context wrapper for that user.- Parameters:
request
- The request from which to read the user.response
- The response from which to read the user.target
- Authentication target (e.g. backend or frontend).- Returns:
- A new modifiable user context for the user from the given request.
-
forWebContext
public static UserContext forWebContext(javax.faces.context.FacesContext ctx, IAuthenticationTarget target) Reads the user from the given Faces context, and creates a new user context wrapper for that user.- Parameters:
ctx
- Faces context from which to read the user.target
- Authentication target (e.g. backend or frontend).- Returns:
- A new modifiable user context for the user from the given request.
-
forBenutzer
Deprecated.useforUser(IUser)
instead. -
forRequest
Deprecated. -
forRequest
@Deprecated public static UserContext forRequest(javax.servlet.http.HttpServletRequest request, boolean createSession) Deprecated. -
forXfcSession
Deprecated. -
getNew
Deprecated.UseANONYMOUS
- Returns:
- User context for the anonymous user
VirtualUser.ANONYMOUS
.
-
VirtualUser.ANONYMOUS
should never be used.