com.ibm.commerce.tools.optools.order.commands
Class CSROrderCopyCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.tools.command.ToolsControllerCommandImpl
                          |
                          +--com.ibm.commerce.tools.optools.order.commands.CSROrderCopyCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, CSROrderCopyCmd, ECCommand, ECTargetableCommand, ToolsControllerCommand

public class CSROrderCopyCmdImpl
extends ToolsControllerCommandImpl
implements CSROrderCopyCmd

This is the default implementation of the CSROrderCopyCmd command.

This command calls the following ControllerCommand:

This command uses the following AccessBean:

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          The IBM Copyright statement.
static java.lang.String ERRTASK_NAME
          The error view name.
 
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.order.commands. CSROrderCopyCmd
defaultCommandClassName, NAME
 
Constructor Summary
CSROrderCopyCmdImpl()
           
 
Method Summary
protected  void executeOrderCopy()
          Calls OrderCopyCmd to make a copy of the order.
 java.lang.String getBackupOrderId()
          Returns the backupOrderId.
 java.util.Hashtable getNLS()
          Returns NLS properties.
 java.lang.String getOrderId()
          Gets the order ID for which the items are to be updated.
  CommandContext getOrgCmdContext()
          Gets the original command context.
  TypedProperty getOrgReqProperties()
          Gets the original request properties.
 java.lang.String getRedirectURL()
          Gets the redirect URL.
  AccessVector getResources()
          Gets the resources accessed by this command.
 java.lang.String getShopperId()
          Gets the shopper ID for which the order is to be added.
 void performExecute()
          Main logic for this command.
 void setBackupOrderId(java.lang.String backupOrderId)
          Sets the order id of the new order.
protected  void setNLS(java.util.Hashtable newNLS)
          Sets NLS properties.
 void setOrderId(java.lang.String newOrderId)
          Sets the order ID to copy
 void setOrgCmdContext( CommandContext newOrgCmdContext)
          Sets the original command context.
 void setOrgReqProperties( TypedProperty newOrgReqProperties)
          Sets the original request properties.
 void setRedirectURL(java.lang.String newRedirectURL)
          Sets the redirect URL.
 void setShopperId(java.lang.String newShopperId)
          Sets the shopper ID that owns the order.
 void validateParameters()
          Verify that caller of the command specified the shopperId and orderId parameters.
 
Methods inherited from class com.ibm.commerce.tools.command. ToolsControllerCommandImpl
getViewInputProperties, setRequestProperties
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.command. ControllerCommand
checkPermission, 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, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

Field Detail
public static final java.lang.String COPYRIGHT
The IBM Copyright statement.
See Also:
Constant Field Values

ERRTASK_NAME

public static java.lang.String ERRTASK_NAME
The error view name.
Constructor Detail

CSROrderCopyCmdImpl

public CSROrderCopyCmdImpl()
Method Detail

executeOrderCopy

protected void executeOrderCopy()
                         throws ECException
Calls OrderCopyCmd to make a copy of the order.
Throws:
ECException - If the order cannot be copied

getBackupOrderId

public java.lang.String getBackupOrderId()
Returns the backupOrderId.
Specified by:
getBackupOrderId in interface CSROrderCopyCmd
Returns:
Backup order id.

getNLS

public java.util.Hashtable getNLS()
Returns NLS properties.
Returns:
The NLS properties.

getOrderId

public java.lang.String getOrderId()
Gets the order ID for which the items are to be updated.
Returns:
The copied order id.

getOrgCmdContext

public CommandContext getOrgCmdContext()
Gets the original command context.
Returns:
The original command context.

getOrgReqProperties

public TypedProperty getOrgReqProperties()
Gets the original request properties.
Returns:
The original request properties.

getRedirectURL

public java.lang.String getRedirectURL()
Gets the redirect URL.
Returns:
The redirect URL.

getResources

public AccessVector getResources()
                          throws ECException
Gets the resources accessed by this command. For this command, the resource accessed is the customer.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
A vector of resource action pairs used by the command.
Throws:
ECException - If the resource can not be retrieved.

getShopperId

public java.lang.String getShopperId()
Gets the shopper ID for which the order is to be added.
Returns:
The shopper ID

performExecute

public void performExecute()
                    throws ECException
Main logic for this command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - If the order cannot be copied successfully.

setBackupOrderId

public void setBackupOrderId(java.lang.String backupOrderId)
Sets the order id of the new order.
Parameters:
backupOrderId - The copied order id.

setNLS

protected void setNLS(java.util.Hashtable newNLS)
Sets NLS properties.
Parameters:
newNLS - The NLS properties.

setOrderId

public void setOrderId(java.lang.String newOrderId)
Sets the order ID to copy
Parameters:
newOrderId - The order ID.

setOrgCmdContext

public void setOrgCmdContext(CommandContext newOrgCmdContext)
Sets the original command context.
Parameters:
newOrgCmdContext - The original command context.

setOrgReqProperties

public void setOrgReqProperties(TypedProperty newOrgReqProperties)
Sets the original request properties.
Parameters:
newOrgReqProperties - The original request properties.

setRedirectURL

public void setRedirectURL(java.lang.String newRedirectURL)
Sets the redirect URL.
Parameters:
newRedirectURL - The redirect URL.

setShopperId

public void setShopperId(java.lang.String newShopperId)
Sets the shopper ID that owns the order.
Parameters:
newShopperId - The shopper ID.

validateParameters

public void validateParameters()
                        throws ECApplicationException
Verify that caller of the command specified the shopperId and orderId parameters.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECApplicationException - If does not contain the required parameters.