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

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

public class CSROrderStatusChangeCmdImpl
extends TaskCommandImpl
implements CSROrderStatusChangeCmd

This is the default implementation of the CSROrderStatusChangCmd command.

This command uses the following AccessBean(s):

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.tools.optools.order.commands. CSROrderStatusChangeCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
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. 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
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values
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 AbstractECTargetableCommand
Returns:
The vector of resource action pairs
Throws:
ECException - If the resource can not be retrieved.

performExecute

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

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 AbstractECTargetableCommand
Throws:
ECException - If the parameters are not valid.