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

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.CSROrderItemUpdateCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, CSROrderItemUpdateCmd, ECCommand, ECTargetableCommand, ToolsControllerCommand

public class CSROrderItemUpdateCmdImpl
extends ToolsControllerCommandImpl
implements CSROrderItemUpdateCmd

This is the default implementation of the CSROrderItemUpdateCmd command.

This command calls the following Command:

This command uses the following AccessBean:

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
static java.lang.String ERRTASK_NAME
          Error handling viewname for this command.
 
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. CSROrderItemUpdateCmd
defaultCommandClassName, NAME
 
Constructor Summary
CSROrderItemUpdateCmdImpl()
           
 
Method Summary
protected  TypedProperty exceptionUtil( TypedProperty prop, java.lang.Exception ex, java.lang.String methodName, java.lang.String cmdName)
          This method sets up the response property when an exception occurs.
protected  void executeOrderItemUpdate()
          Calls OrderItemUpdateCmd to update the order items in the order with the following parameters: quantity orderItemId tradingId shipAddrId shipModeId
 java.lang.String getAddressId()
          Gets the address ID for which the order item is to be updated.
 java.util.Vector getDeleteItems()
          Gets the items to be deleted.
 java.lang.String getFirstOrderId()
          Gets the first order ID.
 java.util.Vector getItems()
          Gets the items in the order.
 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 access vector accessed by this command.
 java.lang.String getSecondOrderId()
          Gets the second order ID.
 java.lang.String getShipModeId()
          Gets the shipping mode ID for which the order item is to be updated.
 java.lang.String getShopperId()
          Gets the shopper ID for which the order is to be added.
 java.util.Vector getUpdateItems()
          Gets the list of items that are to be updated.
 void performExecute()
          Updates the order items for the order.
 void setAddressId(java.lang.String newAddressId)
          Sets the address ID for which the items is to be updated.
 void setDeleteItems(java.util.Vector newDeleteItems)
          Sets the items to be deleted from the order.
 void setFirstOrderId(java.lang.String newFirstOrderId)
          Sets the first order ID.
 void setItems(java.util.Vector newItems)
          Sets the items of the order.
protected  void setNLS(java.util.Hashtable newNLS)
          Sets NLS properties.
 void setOrderId(java.lang.String newOrderId)
          Sets the order ID into which the items are updated.
 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 setSecondOrderId(java.lang.String newSecondOrderId)
          Sets the second order ID.
 void setShipModeId(java.lang.String newShipModeId)
          Sets the shipping mode ID for which the items are updated.
 void setShopperId(java.lang.String newShopperId)
          Sets the shopper ID for which the items are updated.
 void setUpdateItems(java.util.Vector newUpdateItems)
          Sets the items to be updated.
 void validateParameters()
          Gets XMLObject from the GUI Notebook or Wizard and get ready to parse it.
 
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
IBM copyright notice field.
See Also:
Constant Field Values

ERRTASK_NAME

public static java.lang.String ERRTASK_NAME
Error handling viewname for this command.
Constructor Detail

CSROrderItemUpdateCmdImpl

public CSROrderItemUpdateCmdImpl()
Method Detail

exceptionUtil

protected TypedProperty exceptionUtil(TypedProperty prop,
                                      java.lang.Exception ex,
                                      java.lang.String methodName,
                                      java.lang.String cmdName)
This method sets up the response property when an exception occurs.
Parameters:
prop - The response typed property.
ex - The catched exception.
methodName - The name of the method with exception.
cmdName - The name of the command.
Returns:
The proper typed property with redirection to the error page.

executeOrderItemUpdate

protected void executeOrderItemUpdate()
                               throws ECException
Calls OrderItemUpdateCmd to update the order items in the order with the following parameters:
Throws:
ECException - If the order item cannot be updated

getAddressId

public java.lang.String getAddressId()
Gets the address ID for which the order item is to be updated.
Returns:
The address ID.

getDeleteItems

public java.util.Vector getDeleteItems()
Gets the items to be deleted.
Returns:
The vector containing the items to be deleted from the order.

getFirstOrderId

public java.lang.String getFirstOrderId()
Gets the first order ID.
Returns:
The first order ID.

getItems

public java.util.Vector getItems()
Gets the items in the order.
Returns:
The vector that contains the items in the order.

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 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 access vector accessed by this command. The default implementation returns null indicating that no protectable resource is accessed by this command.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
The vector of resource action pairs
Throws:
ECException - If the resource can not be retrieved.

getSecondOrderId

public java.lang.String getSecondOrderId()
Gets the second order ID.
Returns:
The second order ID.

getShipModeId

public java.lang.String getShipModeId()
Gets the shipping mode ID for which the order item is to be updated.
Returns:
The shipping mode ID.

getShopperId

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

getUpdateItems

public java.util.Vector getUpdateItems()
Gets the list of items that are to be updated.
Returns:
The vector of items to be updated.

performExecute

public void performExecute()
                    throws ECException
Updates the order items for the order.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - If the order items cannot be updated successfully.

setAddressId

public void setAddressId(java.lang.String newAddressId)
Sets the address ID for which the items is to be updated.
Parameters:
newAddressId - The address ID.

setDeleteItems

public void setDeleteItems(java.util.Vector newDeleteItems)
Sets the items to be deleted from the order.
Parameters:
newDeleteItems - The vector of items to be deleted from the order.

setFirstOrderId

public void setFirstOrderId(java.lang.String newFirstOrderId)
Sets the first order ID.
Parameters:
newFirstOrderId - The first order ID.

setItems

public void setItems(java.util.Vector newItems)
Sets the items of the order.
Parameters:
newItems - The vector of items in the order.

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 into which the items are updated.
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.

setSecondOrderId

public void setSecondOrderId(java.lang.String newSecondOrderId)
Sets the second order ID.
Parameters:
newSecondOrderId - The second order ID.

setShipModeId

public void setShipModeId(java.lang.String newShipModeId)
Sets the shipping mode ID for which the items are updated.
Parameters:
newShipModeId - The shipping mode ID.

setShopperId

public void setShopperId(java.lang.String newShopperId)
Sets the shopper ID for which the items are updated.
Parameters:
newShopperId - The shopper ID.

setUpdateItems

public void setUpdateItems(java.util.Vector newUpdateItems)
Sets the items to be updated.
Parameters:
newUpdateItems - The vector of items to be updated.

validateParameters

public void validateParameters()
                        throws ECException
Gets XMLObject from the GUI Notebook or Wizard and get ready to parse it.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECApplicationException - If the XML does not contain the required parameters.
ECException