Package org.apache.commons.chain.generic
Class CopyCommand
- java.lang.Object
-
- org.apache.commons.chain.generic.CopyCommand
-
- All Implemented Interfaces:
Command
public class CopyCommand extends java.lang.Object implements Command
Copy a specified literal value, or a context attribute stored under the
fromKey(if any), to thetoKey.- Version:
- $Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $
- Author:
- Craig R. McClanahan
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringfromKeyprivate java.lang.StringtoKeyprivate java.lang.Stringvalue-
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
-
Constructor Summary
Constructors Constructor Description CopyCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexecute(Context context)Copy a specified literal value, or a context attribute stored under thefromKey(if any), to thetoKey.java.lang.StringgetFromKey()Return the context attribute key for the source attribute.java.lang.StringgetToKey()Return the context attribute key for the destination attribute.java.lang.StringgetValue()Return the literal value to be copied.voidsetFromKey(java.lang.String fromKey)Set the context attribute key for the source attribute.voidsetToKey(java.lang.String toKey)Set the context attribute key for the destination attribute.voidsetValue(java.lang.String value)Set the literal value to be copied.
-
-
-
Method Detail
-
getFromKey
public java.lang.String getFromKey()
Return the context attribute key for the source attribute.
- Returns:
- The source attribute key.
-
setFromKey
public void setFromKey(java.lang.String fromKey)
Set the context attribute key for the source attribute.
- Parameters:
fromKey- The new key
-
getToKey
public java.lang.String getToKey()
Return the context attribute key for the destination attribute.
- Returns:
- The destination attribute key.
-
setToKey
public void setToKey(java.lang.String toKey)
Set the context attribute key for the destination attribute.
- Parameters:
toKey- The new key
-
getValue
public java.lang.String getValue()
Return the literal value to be copied.
- Returns:
- The literal value.
-
setValue
public void setValue(java.lang.String value)
Set the literal value to be copied.
- Parameters:
value- The new value
-
execute
public boolean execute(Context context) throws java.lang.Exception
Copy a specified literal value, or a context attribute stored under the
fromKey(if any), to thetoKey.
-
-