com.ibm.commerce.tools.optools.returns.commands
Class CSRReturnCancelCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.tools.command.ToolsControllerCommandImpl
              |
              +--com.ibm.commerce.tools.optools.order.commands.CSRBaseControllerCommandImpl
                    |
                    +--com.ibm.commerce.tools.optools.returns.commands.CSRReturnBaseCmdImpl
                          |
                          +--com.ibm.commerce.tools.optools.returns.commands.CSRReturnCancelCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, CSRReturnCancelCmd, ECCommand, ECTargetableCommand, Protectable, ToolsControllerCommand

public class CSRReturnCancelCmdImpl
extends CSRReturnBaseCmdImpl
implements CSRReturnCancelCmd

Cancels a return by setting the state of the return to cancelled.
This command is a wrapper for the ReturnCancelCmd command.  
See the command class com.ibm.commerce.returns.commands.ReturnCancelCmd for more detailed information
on the behavior.


Field Summary
static java.lang.String COPYRIGHT
           
 
Fields inherited from class com.ibm.commerce.tools.optools.returns.commands.CSRReturnBaseCmdImpl
customerId, ERRTASK_NAME, origCmdContext, origReqProperties, redirectURL, returnId, returnResBun, xmlRoot
 
Fields inherited from class com.ibm.commerce.command.ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.tools.optools.returns.commands.CSRReturnCancelCmd
defaultCommandClassName, NAME
 
Constructor Summary
CSRReturnCancelCmdImpl()
          CSRReturnCancelCmdImpl constructor comment.
 
Method Summary
protected  TypedProperty exceptionUtil(TypedProperty prop, java.lang.Exception ex, java.lang.String methodName, java.lang.String cmdName)
          Sets up the response property when an exception occurs.
protected  void parseInputXMLObject(java.util.Hashtable xmlRoot)
           Parses the input xml data stream, retrieves the parameters and stores them in the objects variables.
 void performExecute()
          Copies the command context and request properties in preparation of calling the ReturnCancelCmd command.
 
Methods inherited from class com.ibm.commerce.tools.optools.returns.commands.CSRReturnBaseCmdImpl
getCustomerId, getNLS, getOrigCmdContext, getOrigReqProperties, getRedirectURL, getResources, getReturnId, setCustomerId, setNLS, setOrigCmdContext, setOrigReqProperties, setRedirectURL, setReturnId, traceFormat, validateParameters
 
Methods inherited from class com.ibm.commerce.tools.optools.order.commands.CSRBaseControllerCommandImpl
callPreCommands, findCmdInterfaceName, getIfExePreCmdChains, getPreCmdChain, setIfExePreCmdChains, setPreCmdChain
 
Methods inherited from class com.ibm.commerce.tools.command.ToolsControllerCommandImpl
getViewInputProperties, setRequestProperties
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

CSRReturnCancelCmdImpl

public CSRReturnCancelCmdImpl()
CSRReturnCancelCmdImpl constructor comment.
Method Detail

exceptionUtil

protected TypedProperty exceptionUtil(TypedProperty prop,
                                      java.lang.Exception ex,
                                      java.lang.String methodName,
                                      java.lang.String cmdName)
Sets up the response property when an exception occurs.
Overrides:
exceptionUtil in class CSRReturnBaseCmdImpl
Parameters:
prop - The response property.
ex - The Exception that was thrown.
methodName - The method name where the exception was caught.
cmdName - The cmd name that caused the exception.

parseInputXMLObject

protected void parseInputXMLObject(java.util.Hashtable xmlRoot)
                            throws ECApplicationException
 Parses the input xml data stream,  retrieves the parameters and stores them in the objects variables.
 The following setter methods are called:  
   - setReturnId
   - setCustomerId
Overrides:
parseInputXMLObject in class CSRReturnBaseCmdImpl
Parameters:
xmlRoot - Representation of the xml data stream as a java Hashtable
Throws:
ECApplicationException - If returnId is null or empty. If customerId is null or empty.

performExecute

public void performExecute()
                    throws ECException
Copies the command context and request properties in preparation of calling the ReturnCancelCmd command. Calls the ReturnCancelCmd. Set up the redirect url by putting the redirect url parameter into the response property
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECApplicationException - If ReturnCancelCmd command throws an exception. If a general exception occurs while parsing and validating the input params.