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

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.tools.optools.order.commands.CSROrderStatusChangeCmdImpl
All Implemented Interfaces:
CSROrderStatusChangeCmd, ECCommand, TaskCommand

public class CSROrderStatusChangeCmdImpl
extends TaskCommandImpl
implements CSROrderStatusChangeCmd

This class updates the status of the order and its order items.


Field Summary
static java.lang.String COPYRIGHT
           
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.tools.optools.order.commands.CSROrderStatusChangeCmd
defaultCommandClassName, NAME
 
Constructor Summary
CSROrderStatusChangeCmdImpl()
           
 
Method Summary
protected  void executeChangeStatus()
          Changes the status of the order.
 java.lang.String getNewStatus()
          Gets the new status
 java.util.Vector getOrderIds()
          Gets the order IDs to be changed
 AccessVector getResources()
          Gets the access vector accessed by this command.
 void performExecute()
          Changes the order status
 void setNewStatus(java.lang.String newNewStatus)
          Sets the new status
 void setOrderIds(java.util.Vector newOrderIds)
          Sets the order IDs that is to be changed into the new order status.
 void validateParameters()
          Validates the parameters for changing the order status.
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, 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.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

CSROrderStatusChangeCmdImpl

public CSROrderStatusChangeCmdImpl()
Method Detail

executeChangeStatus

protected void executeChangeStatus()
                            throws java.lang.Exception
Changes the status of the order.
Throws:
java.lang.Exception - If the order change is not successful.

getNewStatus

public java.lang.String getNewStatus()
Gets the new status
Returns:
The status into which the order is to be changed

getOrderIds

public java.util.Vector getOrderIds()
Gets the order IDs to be changed
Returns:
The order IDs that are to be changed into the new status

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 AbstractECCommand
Returns:
The vector of resource action pairs
Throws:
ECException - The order cannot be retrieved successfully

performExecute

public void performExecute()
                    throws ECException
Changes the order status
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECCommand
Throws:
ECApplicationException - If the order cannot be changed successfully

setNewStatus

public void setNewStatus(java.lang.String newNewStatus)
Sets the new status
Specified by:
setNewStatus in interface CSROrderStatusChangeCmd
Parameters:
newNewStatus - The new status into which the orders is set

setOrderIds

public void setOrderIds(java.util.Vector newOrderIds)
Sets the order IDs that is to be changed into the new order status.
Specified by:
setOrderIds in interface CSROrderStatusChangeCmd
Parameters:
newOrderIds - The order IDs that are to be changed into the new status.

validateParameters

public void validateParameters()
                        throws ECException
Validates the parameters for changing the order status.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECCommand
Throws:
ECException - If the parameters are not valid.