javawebparts.misc.chain
Class CommandConfig

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

public class CommandConfig
extends java.lang.Object

This is the class that represents the configuration for a Command. When the configuration file is read in, instances of this class are created, and added to an instance of the Chain class. When the Chain is executed, the Command class specified in this class will be instantiated and executed.

Author:
Frank W. Zammetti.

Field Summary
private  java.lang.String chain
          The Chain that this Command references.
private  java.lang.String className
          The class that implements this Command.
private  java.lang.String id
          ID of this Command.
private  java.util.List properties
          The collection of properties for this Command.
private  java.lang.String replaceID
          The Command that this Command replaces when this Chain extends another.
 
Constructor Summary
CommandConfig()
          Constructor.
CommandConfig(java.lang.String inID, java.lang.String inClassName, java.lang.String inChain, java.lang.String inReplaceID)
          Constructor.
 
Method Summary
 void addProperty(java.lang.String inName, java.lang.String inValue)
          Add a property to the collection of properties for this Command.
 java.util.List cloneProperties()
          Returns a clone of the properties collection for this Command.
 java.lang.String getChain()
          Getter for the Chain of this Command.
 java.lang.String getClassName()
          Getter for the class of this Command.
 java.lang.String getId()
          Getter for the ID of this Command.
 java.util.List getProperties()
          Returns the collection of properties for this Command.
 java.lang.String getReplaceID()
          Getter for the replaceID of this Command.
 void setChain(java.lang.String inChain)
          Setter for the Chain of this Command.
 void setClassName(java.lang.String inClassName)
          Setter for the class of this Command.
 void setId(java.lang.String inID)
          Setter for the ID of this Command.
 void setProperties(java.util.List inProperties)
          Sets the collection of properties for this Command.
 void setReplaceID(java.lang.String inReplaceID)
          Setter for the replaceID of this Command.
 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

id

private java.lang.String id
ID of this Command.


className

private java.lang.String className
The class that implements this Command.


chain

private java.lang.String chain
The Chain that this Command references. This is for when a Command is actually a whole other Chain.


replaceID

private java.lang.String replaceID
The Command that this Command replaces when this Chain extends another.


properties

private java.util.List properties
The collection of properties for this Command.

Constructor Detail

CommandConfig

public CommandConfig()
Constructor. Calls the other constructor.


CommandConfig

public CommandConfig(java.lang.String inID,
                     java.lang.String inClassName,
                     java.lang.String inChain,
                     java.lang.String inReplaceID)
Constructor.

Parameters:
inID - The ID this Command will be known as.
inClassName - The class that implements this Command.
inChain - The ID of the Chain this Command points to when the Command is a subchain.
inReplaceID - The ID of the Command this Command replaces in the Chain, when the Chain extends another.
Method Detail

cloneProperties

public java.util.List cloneProperties()
Returns a clone of the properties collection for this Command.

Returns:
The list of properties to be set on the Command.

setId

public void setId(java.lang.String inID)
Setter for the ID of this Command.

Parameters:
inID - The ID of this Cmomand.

getId

public java.lang.String getId()
Getter for the ID of this Command.

Returns:
The ID of this Cmomand.

setClassName

public void setClassName(java.lang.String inClassName)
Setter for the class of this Command.

Parameters:
inClassName - The class that implements this Command.

getClassName

public java.lang.String getClassName()
Getter for the class of this Command.

Returns:
The class that implements this Command.

setChain

public void setChain(java.lang.String inChain)
Setter for the Chain of this Command.

Parameters:
inChain - The ID of the Chain this Command references when this Command is a sub-chain.

getChain

public java.lang.String getChain()
Getter for the Chain of this Command.

Returns:
ID of the Chain this Command references.

setReplaceID

public void setReplaceID(java.lang.String inReplaceID)
Setter for the replaceID of this Command.

Parameters:
inReplaceID - The ID of the Command this Command replaces when the Chain extends another.

getReplaceID

public java.lang.String getReplaceID()
Getter for the replaceID of this Command.

Returns:
The ID of the Command this one replaces.

addProperty

public void addProperty(java.lang.String inName,
                        java.lang.String inValue)
Add a property to the collection of properties for this Command.

Parameters:
inName - The name of the property to set on this Command.
inValue - The value of the property to set on this Command.

getProperties

public java.util.List getProperties()
Returns the collection of properties for this Command.

Returns:
The collection of properties to set on this Command.

setProperties

public void setProperties(java.util.List inProperties)
Sets the collection of properties for this Command.

Parameters:
inProperties - The collection of properties to set on this Command.

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