com.cc.framework.adapter.struts
Class FWRequestProcessor

java.lang.Object
  extended byorg.apache.struts.action.RequestProcessor
      extended bycom.cc.framework.adapter.struts.FWRequestProcessor

public class FWRequestProcessor
extends org.apache.struts.action.RequestProcessor

Request Prcessor for use with the Framework Security System

Version:
$Revision: 1.1 $, 1.2
Author:
Harald Schulz

Field Summary
 
Fields inherited from class org.apache.struts.action.RequestProcessor
actions, INCLUDE_PATH_INFO, INCLUDE_SERVLET_PATH, log, moduleConfig, servlet
 
Constructor Summary
FWRequestProcessor()
          Constructor
 
Method Summary
protected  org.apache.struts.action.ActionForward processActionPerform(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.Action action, org.apache.struts.action.ActionForm form, org.apache.struts.action.ActionMapping mapping)
          Ask the specified Action instance to handle this request.
protected  void processForwardConfig(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.config.ForwardConfig forward)
           
protected  void processNoCache(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Set the no-cache headers for all responses, if requested.
protected  void processPopulate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionForm form, org.apache.struts.action.ActionMapping mapping)
           Populate the properties of the specified ActionForm instance from the request parameters included with this request.
protected  boolean processRoles(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping)
          If this action is protected by security roles, make sure that the current user possesses at least one of them.
 
Methods inherited from class org.apache.struts.action.RequestProcessor
destroy, doForward, doInclude, getInternal, getServletContext, init, internalModuleRelativeForward, internalModuleRelativeInclude, process, processActionCreate, processActionForm, processCachedMessages, processContent, processException, processForward, processInclude, processLocale, processMapping, processMultipart, processPath, processPreprocess, processValidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FWRequestProcessor

public FWRequestProcessor()
Constructor

Method Detail

processActionPerform

protected org.apache.struts.action.ActionForward processActionPerform(javax.servlet.http.HttpServletRequest request,
                                                                      javax.servlet.http.HttpServletResponse response,
                                                                      org.apache.struts.action.Action action,
                                                                      org.apache.struts.action.ActionForm form,
                                                                      org.apache.struts.action.ActionMapping mapping)
                                                               throws java.io.IOException,
                                                                      javax.servlet.ServletException
Ask the specified Action instance to handle this request. Return the ActionForward instance (if any) returned by the called Action for further processing.

Parameters:
request - The servlet request we are processing
response - The servlet response we are creating
action - The Action instance to be used
form - The ActionForm instance to pass to this Action
mapping - The ActionMapping instance to pass to this Action
Returns:
ActionForward or null
Throws:
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet exception occurs

processNoCache

protected void processNoCache(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
Set the no-cache headers for all responses, if requested. NOTE - This header will be overridden automatically if a RequestDispatcher.forward() call is ultimately invoked.

Parameters:
request - The servlet request we are processing
response - The servlet response we are creating

processRoles

protected boolean processRoles(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response,
                               org.apache.struts.action.ActionMapping mapping)
                        throws java.io.IOException,
                               javax.servlet.ServletException
If this action is protected by security roles, make sure that the current user possesses at least one of them. Return true to continue normal processing, or false if an appropriate response has been created and processing should terminate.

Parameters:
request - The servlet request we are processing
response - The servlet response we are creating
mapping - The mapping we are using
Returns:
true
Throws:
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet exception occurs

processForwardConfig

protected void processForwardConfig(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    org.apache.struts.config.ForwardConfig forward)
                             throws java.io.IOException,
                                    javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException
See Also:
RequestProcessor.processForwardConfig(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.config.ForwardConfig)

processPopulate

protected void processPopulate(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response,
                               org.apache.struts.action.ActionForm form,
                               org.apache.struts.action.ActionMapping mapping)
                        throws javax.servlet.ServletException

Populate the properties of the specified ActionForm instance from the request parameters included with this request. In addition, request attribute Globals.CANCEL_KEY will be set if the request was submitted with a button created by CancelTag.

Parameters:
request - The servlet request we are processing
response - The servlet response we are creating
form - The ActionForm instance we are populating
mapping - The ActionMapping we are using
Throws:
javax.servlet.ServletException - if thrown by RequestUtils.populate()


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.