org.apache.commons.chain.generic
Class RemoveCommand

java.lang.Object
  extended by org.apache.commons.chain.generic.RemoveCommand
All Implemented Interfaces:
Command

public class RemoveCommand
extends Object
implements Command

Remove any context attribute stored under the fromKey.

Version:
$Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $
Author:
Craig R. McClanahan

Field Summary
 
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
RemoveCommand()
           
 
Method Summary
 boolean execute(Context context)
          Copy the specified source attribute to the specified destination attribute.
 String getFromKey()
          Return the context attribute key for the attribute.
 void setFromKey(String fromKey)
          Set the context attribute key for the attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoveCommand

public RemoveCommand()
Method Detail

getFromKey

public String getFromKey()

Return the context attribute key for the attribute.

Returns:
The context attribute key.

setFromKey

public void setFromKey(String fromKey)

Set the context attribute key for the attribute.

Parameters:
fromKey - The new key

execute

public boolean execute(Context context)
                throws Exception

Copy the specified source attribute to the specified destination attribute.

Specified by:
execute in interface Command
Parameters:
context - Context in which we are operating
Returns:
false so that processing will continue
Throws:
Exception - if and error occurs.


Copyright © 2003-2010 The Apache Software Foundation. All Rights Reserved.