org.strutsit.chain
Class DependCommand

java.lang.Object
  extended byorg.strutsit.chain.DependCommand
All Implemented Interfaces:
org.apache.commons.chain.Command

public abstract class DependCommand
extends java.lang.Object
implements org.apache.commons.chain.Command

Abstract Command for checking dependencies

Since:
JDK 1.4
Version:
$Revision: 1.5 $
Author:
Manfred Wolff

Constructor Summary
DependCommand()
           
 
Method Summary
abstract  void doRegister()
          A DependCommand has to registers his dependencies.
abstract  boolean execute(org.apache.commons.chain.Context context)
           Execute a unit of processing work to be performed.
 java.util.List getClassNames()
          Returns all classNames as a List object.
 java.util.List getNames()
          Returns all names as a List object.
protected  void registerClassName(java.lang.String className)
          Register a dependency as a className
protected  void registerName(java.lang.String name)
          Register a dependency as a name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependCommand

public DependCommand()
Method Detail

registerName

protected void registerName(java.lang.String name)
Register a dependency as a name.

Parameters:
name - The name of the command that depends

registerClassName

protected void registerClassName(java.lang.String className)
Register a dependency as a className

Parameters:
className - The className of the command that depends

getNames

public java.util.List getNames()
Returns all names as a List object.

Returns:
A List object with all names.

getClassNames

public java.util.List getClassNames()
Returns all classNames as a List object.

Returns:
A List object with all ClassNames.

doRegister

public abstract void doRegister()
A DependCommand has to registers his dependencies.


execute

public abstract boolean execute(org.apache.commons.chain.Context context)
                         throws java.lang.Exception

Execute a unit of processing work to be performed. This Command may either complete the required processing and return true, or delegate remaining processing to the next Commandin a Chaincontaining this Commandby returning false

Specified by:
execute in interface org.apache.commons.chain.Command
Parameters:
context - The Contextto be processed by this Command
Returns:
true if the processing of this Contexthas been completed, or false if the processing of this Contextshould be delegated to a subsequent Commandin an enclosing Chain
Throws:
ChainException - general purpose exception return to indicate abnormal termination
java.lang.Exception


Copyright © 2004-2005 Struts-it community. All Rights Reserved.