com.scooterframework.web.controller
Class RestfulRequestProcessor

java.lang.Object
  extended by com.scooterframework.web.controller.BaseRequestProcessor
      extended by com.scooterframework.web.controller.RestfulRequestProcessor

public class RestfulRequestProcessor
extends BaseRequestProcessor

RestfulRequestProcessor contains the processing logic that the MainActionServlet performs as it receives each servlet request from the container. You can customize the request processing behavior by subclassing this class and overriding the method(s) whose behavior you are interested in changing.


Field Summary
static java.lang.String DEFAULT_CONTROLLER_CLASS
           
 
Fields inherited from class com.scooterframework.web.controller.BaseRequestProcessor
EXECUTION_INTERRUPTED, log
 
Constructor Summary
RestfulRequestProcessor()
          Constructor
 
Method Summary
 java.lang.String executeRequest(ActionProperties aps, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process an HttpServletRequest.
protected  java.lang.String getDefaultControllerClassName()
          Returns class name of default controller.
protected  java.lang.String getDefaultViewFilesDirectoryName()
          Returns default view file directory name.
 ActionProperties prepareActionProperties(java.lang.String requestPath, java.lang.String requestHttpMethod, javax.servlet.http.HttpServletRequest request)
          Sets up action properties for the action execution.
protected  void registerActionProperties(javax.servlet.http.HttpServletRequest request, ActionProperties aps)
          Puts some action properties in request object.
 
Methods inherited from class com.scooterframework.web.controller.BaseRequestProcessor
displayHttpRequest, doForward, doForwardToCompileErrorPage, doForwardToErrorPage, executeControllerAction, getActionMethod, getControllerClassName, getControllerInstance, getRealPath, getServletContext, getViewURI, interpretException, isLocalRequest, isRootAccess, process, processCompileError, processError, processException, processLocale, processNotNullResult, processNullResult, processResultContentForRequestFormatType, processResultError, processResultForward, processResultRedirect, processRootAccess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONTROLLER_CLASS

public static final java.lang.String DEFAULT_CONTROLLER_CLASS
See Also:
Constant Field Values
Constructor Detail

RestfulRequestProcessor

public RestfulRequestProcessor()
Constructor

Method Detail

executeRequest

public java.lang.String executeRequest(ActionProperties aps,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws java.io.IOException,
                                       javax.servlet.ServletException

Process an HttpServletRequest.

Overrides:
executeRequest in class BaseRequestProcessor
Parameters:
aps - properties of request
request - The servlet request we are processing
response - The servlet response we are creating
Returns:
execution result
Throws:
java.io.IOException
javax.servlet.ServletException

prepareActionProperties

public ActionProperties prepareActionProperties(java.lang.String requestPath,
                                                java.lang.String requestHttpMethod,
                                                javax.servlet.http.HttpServletRequest request)
Sets up action properties for the action execution. The properties are wrapped up in an ActionProperties instance.

Overrides:
prepareActionProperties in class BaseRequestProcessor
Parameters:
request - The servlet request we are processing
Returns:
an ActionProperties instance

registerActionProperties

protected void registerActionProperties(javax.servlet.http.HttpServletRequest request,
                                        ActionProperties aps)
Puts some action properties in request object.

Overrides:
registerActionProperties in class BaseRequestProcessor

getDefaultControllerClassName

protected java.lang.String getDefaultControllerClassName()
Returns class name of default controller. This default controller is used when application specific controller is not available and the auto.rest property is set to true in the routes.properties file. Subclass must override this method if a different default controller class is used.

Overrides:
getDefaultControllerClassName in class BaseRequestProcessor

getDefaultViewFilesDirectoryName

protected java.lang.String getDefaultViewFilesDirectoryName()
Returns default view file directory name.

Overrides:
getDefaultViewFilesDirectoryName in class BaseRequestProcessor
Returns:
default view file directory name.