shocks.client
Class ActionSupport

java.lang.Object
  extended byshocks.client.ActionSupport
All Implemented Interfaces:
Action, java.lang.Cloneable

public abstract class ActionSupport
extends java.lang.Object
implements Action, java.lang.Cloneable

The primary support class for action components. This class provides a collection of support methods and gives implementing subclasses as much information about the servlet environment as possible. Action classes can get the Request, Response and ServletContext objects as well as metadata information about the current workflow sequence (which could include information from any filters that executed during the "downswing" of the workflow sequence).

All actions (except those which extend FilterSupport and represent crosscutting concerns of the business logic, such as security, i18n and the like) must extend this class. Specifically, all Action classes must override the execute(HttpServletRequest, HttpServletResponse) method.


Constructor Summary
ActionSupport()
           
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the object identical in all regards save its location in memory.
abstract  Result execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method must be overridden by Action authors and must contain a Result object containing instructions for the WorkflowController, so it can determine which Sequence to perform next.
 DataSource execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext ctx)
          This method cannot be overridden by the user.
 java.lang.String getClassName()
           
 javax.servlet.ServletContext getContext()
           
 void init(DataSource metadata)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionSupport

public ActionSupport()
Method Detail

init

public final void init(DataSource metadata)

getClassName

public final java.lang.String getClassName()

getContext

public final javax.servlet.ServletContext getContext()

execute

public final DataSource execute(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                javax.servlet.ServletContext ctx)

This method cannot be overridden by the user. It is specifically designed for use by the container. The method the user should concern themselves with is below.

This method is called by the enclosing workflow component, usually a SequenceTerminator. Its purpose is to staff the action with a request & response pair, and a reference to the current servlet context.

Specified by:
execute in interface Action
Returns:
DataSource

execute

public abstract Result execute(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response)
This method must be overridden by Action authors and must contain a Result object containing instructions for the WorkflowController, so it can determine which Sequence to perform next. Also, the Result object can contain instructions for filters which might execute during the "upswing" of the workflow sequence.

Parameters:
request -
response -
Returns:
Result

clone

public final java.lang.Object clone()
Returns a clone of the object identical in all regards save its location in memory.