javawebparts.misc.chain.commands
Class SimpleCommand

java.lang.Object
  |
  +--javawebparts.misc.chain.commands.SimpleCommand
All Implemented Interfaces:
Command

public class SimpleCommand
extends java.lang.Object
implements Command

This is a standard Command that simply implements all the required methods of the Command interface and returns Result.SUCCESS from each. This is handy if you need to write a Command that only cares about the execute() method, this way you can extend this class instead of directly implementing Command and only have to override execute(), init() and cleanup() will take care of themselves.


Constructor Summary
SimpleCommand()
           
 
Method Summary
 Result cleanup(ChainContext chainContext)
          Cleanup().
 Result execute(ChainContext chainContext)
          Execute().
 Result init(ChainContext chainContext)
          Init().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCommand

public SimpleCommand()
Method Detail

init

public Result init(ChainContext chainContext)
Init().

Specified by:
init in interface Command
Parameters:
chainContext - The Chain Context being used by the Chain executing this command.
Returns:
The Result object indicating how this method execution went.

execute

public Result execute(ChainContext chainContext)
Execute().

Specified by:
execute in interface Command
Parameters:
chainContext - The Chain Context being used by the Chain executing this command.
Returns:
The Result object indicating how this method execution went.

cleanup

public Result cleanup(ChainContext chainContext)
Cleanup().

Specified by:
cleanup in interface Command
Parameters:
chainContext - The Chain Context being used by the Chain executing this command.
Returns:
The Result object indicating how this method execution went.


Copyright 2005 Frank W. Zammetti