ca.bc.gov.webade.j2ee
Class WebAppRequestProcessingUtils

java.lang.Object
  extended byca.bc.gov.webade.j2ee.WebAppRequestProcessingUtils

public final class WebAppRequestProcessingUtils
extends java.lang.Object

Author:
jross

Field Summary
static int BAD_REQUEST
          BAD_REQUEST is the HTTP error code for a bad request.
static java.lang.String CURRENT_WEBADE_USER_CREDENTIALS
          The attribute name for the UserCredentials object in the HttpSession
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_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
 
Method Summary
static void postprocessRequest(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Postprocess an HTTP request.
static boolean preprocessRequest(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Preprocess an HTTP request.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEBADE_USER

public static final java.lang.String WEBADE_USER
The attribute name for the User object in the HttpSession

See Also:
Constant Field Values

CURRENT_WEBADE_USER_CREDENTIALS

public static final java.lang.String CURRENT_WEBADE_USER_CREDENTIALS
The attribute name for the UserCredentials object in the HttpSession

See Also:
Constant Field Values

CURRENT_WEBADE_USER_PERMISSIONS

public static final java.lang.String CURRENT_WEBADE_USER_PERMISSIONS
The attribute name for the WebADEUserPermissions object in the HttpSession

See Also:
Constant Field Values

CURRENT_WEBADE_USER_INFO

public static final java.lang.String CURRENT_WEBADE_USER_INFO
The attribute name for the WebADEUserInfo object in the HttpSession

See Also:
Constant Field Values

WEBADE_HAS_PREPROCESSED_REQUEST

public static final java.lang.String WEBADE_HAS_PREPROCESSED_REQUEST
The request attribute name for the flag indicating the WebADE has pre-processed this request.

See Also:
Constant Field Values

BAD_REQUEST

public static final int BAD_REQUEST
BAD_REQUEST is the HTTP error code for a bad request.

See Also:
Constant Field Values
Method Detail

preprocessRequest

public static boolean preprocessRequest(javax.servlet.ServletContext context,
                                        javax.servlet.http.HttpServletRequest req,
                                        javax.servlet.http.HttpServletResponse res)
                                 throws javax.servlet.ServletException
Preprocess an HTTP request. Checks to see if the application has been disabled, or is improperly configured. Also checks to see if the application supports organization-selection or if the user has agreements to be agreed to.

Parameters:
context - The servlet context.
req - The incoming request.
res - The outgoing response.
Returns:
A boolean flag indicating whether to continue processing the request.
Throws:
javax.servlet.ServletException

postprocessRequest

public static void postprocessRequest(javax.servlet.ServletContext context,
                                      javax.servlet.http.HttpServletRequest req,
                                      javax.servlet.http.HttpServletResponse res)
                               throws javax.servlet.ServletException
Postprocess an HTTP request. Cleans up the WebADE request-based state after the request is processed.

Parameters:
context - The servlet context.
req - The incoming request.
res - The outgoing response.
Throws:
javax.servlet.ServletException