toolbox.web
Class AbstractXMLWebAction

Package class diagram package AbstractXMLWebAction
java.lang.Object
  extended by toolbox.web.BaseWebAction
      extended by toolbox.web.AbstractXMLWebAction
All Implemented Interfaces:
WebAction

public abstract class AbstractXMLWebAction
extends BaseWebAction
implements WebAction

A convenience WebAction implementation that may be extended to handle the body of HTTP requests as XML Document instances.

Sub-classes must provide an implementation of the onDocumentBody(..) method.


Constructor Summary
protected AbstractXMLWebAction()
          Protected constructor.
 
Method Summary
 void execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext context)
          Convert the provided request body into a Document and invoke the onDocumentBody(..) method.
abstract  void onDocumentBody(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext context, org.w3c.dom.Document body)
          Implementing classes must override this abstract method to implement the required request handling functionality.
 
Methods inherited from class toolbox.web.BaseWebAction
create, dispatch, getBodyAsDocument, getBodyAsString, getDisplayTemplate, getFailureTemplate, getForeignContext, getGlobalProperty, getMessage, getName, getProperties, getProperty, getResource, getResourceBundle, getResourceString, getResourceString, getResourceString, getResourceString, getResourceString, getSuccessTemplate, getTemplate, getValidator, logConfig, logFine, logFiner, logFinest, logInfo, logSevere, logWarning, redirect, split
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface toolbox.web.WebAction
create
 

Constructor Detail

AbstractXMLWebAction

protected AbstractXMLWebAction()
Protected constructor. This class must not be instantiated.

Method Detail

onDocumentBody

public abstract void onDocumentBody(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    javax.servlet.ServletContext context,
                                    org.w3c.dom.Document body)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
Implementing classes must override this abstract method to implement the required request handling functionality.

Parameters:
request - HTTP request.
response - HTTP response.
context - Web application context.
body - Document instance containing the body of the request.
Throws:
javax.servlet.ServletException
java.io.IOException

execute

public void execute(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response,
                    javax.servlet.ServletContext context)
             throws javax.servlet.ServletException,
                    java.io.IOException
Convert the provided request body into a Document and invoke the onDocumentBody(..) method.

Specified by:
execute in interface WebAction
Parameters:
request - HTTP request.
response - HTTP response.
context - Web application context.
Throws:
javax.servlet.ServletException
java.io.IOException