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

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.CSRReturnRestoreCopyCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, CSRReturnRestoreCopyCmd, ECCommand, ECTargetableCommand, Protectable, ToolsControllerCommand

public class CSRReturnRestoreCopyCmdImpl
extends CSRReturnBaseCmdImpl
implements CSRReturnRestoreCopyCmd

	Restores the return to its original state.  This command is called from the edit return notebook
	when the user presses the cancel button.


Field Summary
static java.lang.String COPYRIGHT
           
protected  RMAStorage newRMAStorage
           
protected  RMAStorage savedRMAStorage
           
 
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.CSRReturnRestoreCopyCmd
defaultCommandClassName, NAME
 
Constructor Summary
CSRReturnRestoreCopyCmdImpl()
           
 
Method Summary
protected  void executeReturnRestoreCopy()
           The main logic of this command is in this method.
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()
          Calls the method executeReturnRestoreCopy.
 
Methods inherited from class com.ibm.commerce.tools.optools.returns.commands.CSRReturnBaseCmdImpl
exceptionUtil, 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

newRMAStorage

protected RMAStorage newRMAStorage

savedRMAStorage

protected RMAStorage savedRMAStorage
Constructor Detail

CSRReturnRestoreCopyCmdImpl

public CSRReturnRestoreCopyCmdImpl()
Method Detail

executeReturnRestoreCopy

protected void executeReturnRestoreCopy()
                                 throws java.lang.Exception
 The main logic of this command is in this method.  This method does the following:
  - deletes the current return data from the database
  - retrieves the cached version of the original return from the wcs session
  - saves the cached version of the original return data to the database

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
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.

performExecute

public void performExecute()
                    throws ECException
Calls the method executeReturnRestoreCopy. 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 a general exception occurs.