|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.chain.generic.CopyCommand
public class CopyCommand
Copy a specified literal value, or a context attribute stored under
the fromKey
(if any), to the toKey
.
Field Summary |
---|
Fields inherited from interface org.apache.commons.chain.Command |
---|
CONTINUE_PROCESSING, PROCESSING_COMPLETE |
Constructor Summary | |
---|---|
CopyCommand()
|
Method Summary | |
---|---|
boolean |
execute(Context context)
Copy a specified literal value, or a context attribute stored under the fromKey (if any), to the toKey . |
String |
getFromKey()
Return the context attribute key for the source attribute. |
String |
getToKey()
Return the context attribute key for the destination attribute. |
String |
getValue()
Return the literal value to be copied. |
void |
setFromKey(String fromKey)
Set the context attribute key for the source attribute. |
void |
setToKey(String toKey)
Set the context attribute key for the destination attribute. |
void |
setValue(String value)
Set the literal value to be copied. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CopyCommand()
Method Detail |
---|
public String getFromKey()
Return the context attribute key for the source attribute.
public void setFromKey(String fromKey)
Set the context attribute key for the source attribute.
fromKey
- The new keypublic String getToKey()
Return the context attribute key for the destination attribute.
public void setToKey(String toKey)
Set the context attribute key for the destination attribute.
toKey
- The new keypublic String getValue()
Return the literal value to be copied.
public void setValue(String value)
Set the literal value to be copied.
value
- The new valuepublic boolean execute(Context context) throws Exception
Copy a specified literal value, or a context attribute stored under
the fromKey
(if any), to the toKey
.
execute
in interface Command
context
- Context
in which we are operating
false
so that processing will continue
Exception
- in the if an error occurs during execution.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |