Package org.apache.commons.chain.generic
Class CopyCommand<C extends Context>
java.lang.Object
org.apache.commons.chain.generic.CopyCommand<C>
- Type Parameters:
C
- Type of the context associated with this command
- All Implemented Interfaces:
Command<C>
Copy a specified literal value, or a context attribute stored under
the
fromKey
(if any), to the toKey
.- Version:
- $Revision$ $Date$
- Author:
- Craig R. McClanahan
-
Field Summary
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Copy a specified literal value, or a context attribute stored under thefromKey
(if any), to thetoKey
.Return the context attribute key for the source attribute.getToKey()
Return the context attribute key for the destination attribute.getValue()
Return the literal value to be copied.void
setFromKey
(String fromKey) Set the context attribute key for the source attribute.void
Set the context attribute key for the destination attribute.void
Set the literal value to be copied.
-
Constructor Details
-
CopyCommand
public CopyCommand()The Default-Constructor for this class.
-
-
Method Details
-
getFromKey
Return the context attribute key for the source attribute.- Returns:
- The source attribute key.
-
setFromKey
Set the context attribute key for the source attribute.- Parameters:
fromKey
- The new key
-
getToKey
Return the context attribute key for the destination attribute.- Returns:
- The destination attribute key.
-
setToKey
Set the context attribute key for the destination attribute.- Parameters:
toKey
- The new key
-
getValue
Return the literal value to be copied.- Returns:
- The literal value.
-
setValue
Set the literal value to be copied.- Parameters:
value
- The new value
-
execute
Copy a specified literal value, or a context attribute stored under thefromKey
(if any), to thetoKey
.
-