|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.bc.gov.webade.http.HttpRequestUtils
Used to retrieve the application and user info service singletons from the servlet context and the session user's permissions and information from the session object associated with the current request.
| Field Summary | |
static java.lang.String |
CURRENT_WEBADE_USER_INFO
The attribute name for the WebADEUserInfo object in the
HttpSession |
static java.lang.String |
CURRENT_WEBADE_USER_PERMISSIONS
The attribute name for the WebADEUserPermissions object in
the HttpSession |
static java.lang.String |
WEBADE_APPLICATION
The attribute name for the Application object in the
HttpSession |
static java.lang.String |
WEBADE_FLOW_CONTROL_FLAG
The attribute name for the flag used by the tag FlowControlTag to prevent users from calling JSPs
directly. |
static java.lang.String |
WEBADE_HAS_PREPROCESSED_REQUEST
The request attribute name for the flag indicating the WebADE has pre-processed this request. |
static java.lang.String |
WEBADE_USER
The attribute name for the User object in the
HttpSession |
static java.lang.String |
WEBADE_USER_INFO_SERVICE
The attribute name for the UserInfoService object in the
HttpSession |
| Constructor Summary | |
HttpRequestUtils()
|
|
| Method Summary | |
static Application |
getApplication(javax.servlet.ServletContext context)
A convenience method for web application code needing to access the Application object. |
static User |
getCurrentUser(javax.servlet.http.HttpServletRequest req)
Deprecated. Use getCurrentUserPermissions(javax.servlet.http.HttpServletRequest)
and
getCurrentUserInfo(javax.servlet.http.HttpServletRequest)
instead. |
static User |
getCurrentUser(javax.servlet.http.HttpSession session)
Deprecated. Use getCurrentUserPermissions(javax.servlet.http.HttpSession)
and
getCurrentUserInfo(javax.servlet.http.HttpSession)
instead. |
static WebADEUserInfo |
getCurrentUserInfo(javax.servlet.http.HttpServletRequest req)
Returns the WebADEUserInfo object for the user making the
request. |
static WebADEUserInfo |
getCurrentUserInfo(javax.servlet.http.HttpSession session)
Returns the WebADEUserInfo object for the user making the
request. |
static WebADECurrentUserPermissions |
getCurrentUserPermissions(javax.servlet.http.HttpServletRequest req)
Returns the WebADEUserPermissions object for the user
making the request. |
static WebADECurrentUserPermissions |
getCurrentUserPermissions(javax.servlet.http.HttpSession session)
Returns the WebADEUserPermissions object for the user
making the request. |
static UserInfoService |
getUserInfoService(javax.servlet.ServletContext context)
A convenience method for web application code needing to access the UserInfoService object. |
static void |
init(javax.servlet.ServletConfig config,
javax.servlet.ServletContext context,
java.lang.String appCode)
Deprecated. Use WebAppInitializationUtils.initializeWebApp(javax.servlet.ServletContext, java.lang.String)
instead. |
static void |
init(javax.servlet.ServletContext context,
java.lang.String appCode)
Deprecated. Use WebAppInitializationUtils.initializeWebApp(javax.servlet.ServletContext, java.lang.String)
instead. |
static boolean |
isAnonymousRemoteUser(javax.servlet.http.HttpServletRequest req)
Tests if the remote user making this request is the anonymous user (eg has not been authenticated by the Web server). |
static void |
postprocessRequest(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Deprecated. Use WebAppRequestProcessingUtils.postprocessRequest(ServletContext, HttpServletRequest, HttpServletResponse) |
static boolean |
preprocessRequest(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Deprecated. Use WebAppRequestProcessingUtils.preprocessRequest(ServletContext, HttpServletRequest, HttpServletResponse) |
static User |
reloadCurrentUser(javax.servlet.http.HttpServletRequest req)
Deprecated. Use reloadCurrentUserPermissions(javax.servlet.http.HttpServletRequest)
and
reloadCurrentUserInfo(javax.servlet.http.HttpServletRequest)
instead. |
static WebADEUserInfo |
reloadCurrentUserInfo(javax.servlet.http.HttpServletRequest req)
Refreshes and returns the WebADEUserInfo object from the
session for the user making the request. |
static WebADECurrentUserPermissions |
reloadCurrentUserPermissions(javax.servlet.http.HttpServletRequest req)
Refreshes and returns the WebADECurrentUserPermissions
object from the session for the user making the request. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String WEBADE_APPLICATION
Application object in the
HttpSession
public static final java.lang.String WEBADE_USER_INFO_SERVICE
UserInfoService object in the
HttpSession
public static final java.lang.String WEBADE_USER
User object in the
HttpSession
public static final java.lang.String CURRENT_WEBADE_USER_PERMISSIONS
WebADEUserPermissions object in
the HttpSession
public static final java.lang.String CURRENT_WEBADE_USER_INFO
WebADEUserInfo object in the
HttpSession
public static final java.lang.String WEBADE_FLOW_CONTROL_FLAG
FlowControlTag to prevent users from calling JSPs
directly.
public static final java.lang.String WEBADE_HAS_PREPROCESSED_REQUEST
| Constructor Detail |
public HttpRequestUtils()
| Method Detail |
public static void init(javax.servlet.ServletConfig config,
javax.servlet.ServletContext context,
java.lang.String appCode)
WebAppInitializationUtils.initializeWebApp(javax.servlet.ServletContext, java.lang.String)
instead.
config - Servlet config.context - Servlet context to create the application singleton in.appCode - The application code used to load WebADE info for.
public static void init(javax.servlet.ServletContext context,
java.lang.String appCode)
WebAppInitializationUtils.initializeWebApp(javax.servlet.ServletContext, java.lang.String)
instead.
context - Servlet context to create the application singleton in.appCode - The application code used to load WebADE info for.
public static boolean preprocessRequest(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException
WebAppRequestProcessingUtils.preprocessRequest(ServletContext, HttpServletRequest, HttpServletResponse)
context - The servlet context.req - The incoming request.res - The outgoing response.
javax.servlet.ServletException
public static void postprocessRequest(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException
WebAppRequestProcessingUtils.postprocessRequest(ServletContext, HttpServletRequest, HttpServletResponse)
context - The servlet context.req - The incoming request.res - The outgoing response.
javax.servlet.ServletExceptionpublic static User getCurrentUser(javax.servlet.http.HttpSession session)
getCurrentUserPermissions(javax.servlet.http.HttpSession)
and
getCurrentUserInfo(javax.servlet.http.HttpSession)
instead.
User object for the user making the request.
The User object is obtained from the session if it exists,
otherwise it is obtained from the request. This method assumes that the
User object already exists (as will be the case in a WebADE application).
session - The user's session.
public static User getCurrentUser(javax.servlet.http.HttpServletRequest req)
getCurrentUserPermissions(javax.servlet.http.HttpServletRequest)
and
getCurrentUserInfo(javax.servlet.http.HttpServletRequest)
instead.
User object for the user making the request.
The User object is obtained from the session if it exists,
otherwise it is obtained from the request. This method assumes that the
User object already exists (as will be the case in a WebADE application).
req - The request object.
public static WebADECurrentUserPermissions getCurrentUserPermissions(javax.servlet.http.HttpSession session)
WebADEUserPermissions object for the user
making the request. The WebADEUserPermissions object is
obtained from the session if it exists, otherwise it is obtained from the
request. This method assumes that the User object already exists (as will
be the case in a WebADE application).
session - The user's session.
public static WebADECurrentUserPermissions getCurrentUserPermissions(javax.servlet.http.HttpServletRequest req)
WebADEUserPermissions object for the user
making the request. The WebADEUserPermissions object is
obtained from the session if it exists, otherwise it is obtained from the
request. This method assumes that the User object already exists (as will
be the case in a WebADE application).
req - The request object.
public static WebADEUserInfo getCurrentUserInfo(javax.servlet.http.HttpSession session)
WebADEUserInfo object for the user making the
request. The WebADEUserInfo object is obtained from the
session if it exists, otherwise it is obtained from the request. This
method assumes that the User object already exists (as will be the case
in a WebADE application).
session - The user's session.
public static WebADEUserInfo getCurrentUserInfo(javax.servlet.http.HttpServletRequest req)
WebADEUserInfo object for the user making the
request. The WebADEUserInfo object is obtained from the
session if it exists, otherwise it is obtained from the request. This
method assumes that the User object already exists (as will be the case
in a WebADE application).
req - The request object.
public static User reloadCurrentUser(javax.servlet.http.HttpServletRequest req)
throws WebADEException
reloadCurrentUserPermissions(javax.servlet.http.HttpServletRequest)
and
reloadCurrentUserInfo(javax.servlet.http.HttpServletRequest)
instead.
User object from the session for
the user making the request. The User object is obtained
from the session if it exists, otherwise it is obtained from the request.
req - The user's request.
WebADEException
public static WebADECurrentUserPermissions reloadCurrentUserPermissions(javax.servlet.http.HttpServletRequest req)
throws WebADEException
WebADECurrentUserPermissions
object from the session for the user making the request. The
WebADECurrentUserPermissions object is obtained from the
session if it exists, otherwise it is obtained from the request.
req - The user's request.
WebADEException
public static WebADEUserInfo reloadCurrentUserInfo(javax.servlet.http.HttpServletRequest req)
throws WebADEException
WebADEUserInfo object from the
session for the user making the request. The WebADEUserInfo
object is obtained from the session if it exists, otherwise it is
obtained from the request.
req - The user's request.
WebADEExceptionpublic static boolean isAnonymousRemoteUser(javax.servlet.http.HttpServletRequest req)
req - The request object.
public static Application getApplication(javax.servlet.ServletContext context)
Application app = HttpRequestUtils.getApplication(context);
context - Servlet context to retrieve the application singleton from.
public static UserInfoService getUserInfoService(javax.servlet.ServletContext context)
UserInfoService service = HttpRequestUtils.getUserInfoService(context);
context - Servlet context to retrieve UserInfoService singleton from.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||