javawebparts.misc.chain
Class Chain

java.lang.Object
  |
  +--javawebparts.misc.chain.Chain

public class Chain
extends java.lang.Object

This class represents a Chain.

Author:
Frank W. Zammetti.

Field Summary
private  java.util.List commands
          The collection of Commands that belong to this Chain.
private  int executionIndex
          The index of the currently executing Command in this Chain.
private  java.lang.String extendsID
          The ID of the Catalog this Catalog extends, if any
private  java.lang.String id
          The ID of this Chain.
private static org.apache.commons.logging.Log log
          Log instance.
 
Constructor Summary
Chain()
          Constructor.
Chain(java.lang.String inID, java.lang.String inExtendsID)
          Constructor.
 
Method Summary
 void addCommand(CommandConfig inCommand)
          Adds a Command to this Chain.
 java.util.List cloneCommands()
          Returns a clone of the commands collection for this Chain.
 Result execute(ChainManager chainManager, ChainContext chainContext)
          Executes the Chain.
 java.lang.String getExtendsID()
          Gets the ID of the Chain that this Chain extends.
 java.lang.String getId()
          Gets the ID of this Chain.
 void setCommands(java.util.List inCommands)
          Sets the entire commands collection at once.
 void setExtendsID(java.lang.String inExtendsID)
          Sets the ID of the Chain that this Chain extends.
 void setId(java.lang.String inID)
          Sets the ID of this Chain.
 java.lang.String toString()
          Overridden toString method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log
Log instance.


commands

private java.util.List commands
The collection of Commands that belong to this Chain.


executionIndex

private int executionIndex
The index of the currently executing Command in this Chain.


id

private java.lang.String id
The ID of this Chain.


extendsID

private java.lang.String extendsID
The ID of the Catalog this Catalog extends, if any

Constructor Detail

Chain

public Chain()
Constructor. Calls the other constructor.


Chain

public Chain(java.lang.String inID,
             java.lang.String inExtendsID)
Constructor.

Parameters:
inID - The ID of this Chain.
inExtendsID - The ID of the Chain this one extends.
Method Detail

cloneCommands

public java.util.List cloneCommands()
Returns a clone of the commands collection for this Chain.

Returns:
The collection of Commands cloned from this Chain.

setId

public void setId(java.lang.String inID)
Sets the ID of this Chain.

Parameters:
inID - The ID of this Chain.

getId

public java.lang.String getId()
Gets the ID of this Chain.

Returns:
The ID of this Chain.

setExtendsID

public void setExtendsID(java.lang.String inExtendsID)
Sets the ID of the Chain that this Chain extends.

Parameters:
inExtendsID - The ID of the Chain this one extends.

getExtendsID

public java.lang.String getExtendsID()
Gets the ID of the Chain that this Chain extends.

Returns:
The ID of the Chain this one extends.

addCommand

public void addCommand(CommandConfig inCommand)
Adds a Command to this Chain.

Parameters:
inCommand - The CommandConfig to add to this Chain.

setCommands

public void setCommands(java.util.List inCommands)
Sets the entire commands collection at once.

Parameters:
inCommands - The collection of CommandConfigs to add to this Chain.

execute

public Result execute(ChainManager chainManager,
                      ChainContext chainContext)
Executes the Chain.

Parameters:
chainManager - The ChainManager instance executing this Chain.
chainContext - The ChainContext instance being used by this Chain.
Returns:
Result instance.

toString

public java.lang.String toString()
Overridden toString method.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this bean.


Copyright © 2005 Frank W. Zammetti