com.ibm.commerce.orderitems.commands
Class OrderItemMoveCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.orderitems.commands.OrderItemMoveCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderItemMoveCmd, Protectable

public class OrderItemMoveCmdImpl
extends ControllerCommandImpl
implements OrderItemMoveCmd

The OrderItemMove command can be used to move order items from one order to another.

Behavior

OrderItemMove command


Field Summary
static java.lang.String COPYRIGHT
           
 
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.orderitems.commands.OrderItemMoveCmd
defaultCommandClassName, NAME
 
Constructor Summary
OrderItemMoveCmdImpl()
           
 
Method Summary
 java.lang.String[] getFromOrderItems()
          Gets the input order items.
 java.lang.String[] getFromOrders()
          Gets the orders from which order items will be moved.
 java.lang.String[] getInOrderNames()
          Gets the names of name-value pairs to be added to the redirection URL.
 java.lang.String[] getOrdersToDeleteIfEmpty()
          Gets orders to delete if no order items remain in them after this command completes processing.
 java.lang.String[] getOutOrderItemNames()
          Gets the names of name-value pairs to be added to the redirection URL.
 OrderItemAccessBean[] getOutOrderItems()
          Gets the output order items.
 java.lang.String[] getOutOrderNames()
          Gets the names of name-value pairs to be added to the redirection URL.
 OrderAccessBean[] getOutOrders()
          Gets the output order where input order items are moved to.
 java.lang.String[] getToOrders()
          Gets a destination order for the output order items.
 java.lang.String getUrl()
          Gets the URL to be redirected to when the command completes successfully.
 void performExecute()
          Contains the actual business logic of the command.
 void reset()
          This method should be called after a command has been executed to reset its state variables.
 void setFromOrderItems(java.lang.String[] newFromOrderItems)
          Sets the input order items.
 void setFromOrders(java.lang.String[] newFromOrders)
          Sets the orders from which order items will be moved.
 void setInOrderNames(java.lang.String[] newInOrderNames)
          Sets the names of name-value pairs to be added to the redirection URL.
 void setOrdersToDeleteIfEmpty(java.lang.String[] newOrdersToDeleteIfEmpty)
          Sets orders to delete if no order items remain in them after this command completes processing.
 void setOrderToCreateIfEmpty(boolean abOrderToCreateIfEmpty)
          Sets the boolean flag to control the creation of an empty output order when there are not order items to move into it.
 void setOutOrderItemNames(java.lang.String[] newOutOrderItemNames)
          Sets the names of name-value pairs to be added to the redirection URL.
 void setOutOrderItems(OrderItemAccessBean[] newOutOrderItems)
          Sets the output order items.
 void setOutOrderNames(java.lang.String[] newOutOrderNames)
          Sets the names of name-value pairs to be added to the redirection URL.
 void setOutOrders(OrderAccessBean[] newOutOrders)
          Sets the output order where input order items are moved to.
 void setRequestProperties(TypedProperty ahshRequestProperties)
          The WebController calls this method before invoking the execute method in this command to set the request properties for this command.
 void setToOrders(java.lang.String[] newToOrders)
          Sets a destination order for the output order items.
 void setUrl(java.lang.String newUrl)
          Sets the URL to be redirected to when the command completes successfully.
 void validateParameters()
          Performs server side parameter checking.
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, 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, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, 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
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

OrderItemMoveCmdImpl

public OrderItemMoveCmdImpl()
Method Detail

getFromOrderItems

public java.lang.String[] getFromOrderItems()
Gets the input order items.

getFromOrders

public java.lang.String[] getFromOrders()
Gets the orders from which order items will be moved.

getInOrderNames

public java.lang.String[] getInOrderNames()
Gets the names of name-value pairs to be added to the redirection URL.

getOrdersToDeleteIfEmpty

public java.lang.String[] getOrdersToDeleteIfEmpty()
Gets orders to delete if no order items remain in them after this command completes processing.

getOutOrderItemNames

public java.lang.String[] getOutOrderItemNames()
Gets the names of name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of an output order item.

getOutOrderItems

public OrderItemAccessBean[] getOutOrderItems()
Gets the output order items.
Specified by:
getOutOrderItems in interface OrderItemMoveCmd

getOutOrderNames

public java.lang.String[] getOutOrderNames()
Gets the names of name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of an output order item.

getOutOrders

public OrderAccessBean[] getOutOrders()
Gets the output order where input order items are moved to.
Specified by:
getOutOrders in interface OrderItemMoveCmd

getToOrders

public java.lang.String[] getToOrders()
Gets a destination order for the output order items.

getUrl

public java.lang.String getUrl()
Gets the URL to be redirected to when the command completes successfully.

performExecute

public void performExecute()
                    throws ECException
Contains the actual business logic of the command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

reset

public void reset()
This method should be called after a command has been executed to reset its state variables.
Overrides:
reset in class AbstractECTargetableCommand

setFromOrderItems

public void setFromOrderItems(java.lang.String[] newFromOrderItems)
Sets the input order items. Any order items not in the orders specified by the setFromOrders method are ignored.
Specified by:
setFromOrderItems in interface OrderItemMoveCmd

setFromOrders

public void setFromOrders(java.lang.String[] newFromOrders)
Sets the orders from which order items will be moved. This parameter is used to resolve order item abbreviations specified by the setFromOrderItemId method.
Specified by:
setFromOrders in interface OrderItemMoveCmd

setInOrderNames

public void setInOrderNames(java.lang.String[] newInOrderNames)
Sets the names of name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of an output order.
Specified by:
setInOrderNames in interface OrderItemMoveCmd

setOrdersToDeleteIfEmpty

public void setOrdersToDeleteIfEmpty(java.lang.String[] newOrdersToDeleteIfEmpty)
Sets orders to delete if no order items remain in them after this command completes processing.
Specified by:
setOrdersToDeleteIfEmpty in interface OrderItemMoveCmd

setOrderToCreateIfEmpty

public void setOrderToCreateIfEmpty(boolean abOrderToCreateIfEmpty)
Sets the boolean flag to control the creation of an empty output order when there are not order items to move into it.
Specified by:
setOrderToCreateIfEmpty in interface OrderItemMoveCmd

setOutOrderItemNames

public void setOutOrderItemNames(java.lang.String[] newOutOrderItemNames)
Sets the names of name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of an output order item.
Specified by:
setOutOrderItemNames in interface OrderItemMoveCmd

setOutOrderItems

public void setOutOrderItems(OrderItemAccessBean[] newOutOrderItems)
Sets the output order items.

setOutOrderNames

public void setOutOrderNames(java.lang.String[] newOutOrderNames)
Sets the names of name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of an output order.
Specified by:
setOutOrderNames in interface OrderItemMoveCmd

setOutOrders

public void setOutOrders(OrderAccessBean[] newOutOrders)
Sets the output order where input order items are moved to.

setRequestProperties

public void setRequestProperties(TypedProperty ahshRequestProperties)
                          throws ECApplicationException
The WebController calls this method before invoking the execute method in this command to set the request properties for this command.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Following copied from interface: com.ibm.commerce.command.ControllerCommand
Parameters:
requestProperties - com.ibm.commerce.datatype.TypedProperty
Throws:
com.ibm.commerce.exception.ECException. -  

setToOrders

public void setToOrders(java.lang.String[] newToOrders)
Sets a destination order for the output order items. If this parameter is not specified, it means there is no output order, and the input order items will be simply removed from the source orders specified by the setFromOrders method.
Specified by:
setToOrders in interface OrderItemMoveCmd

setUrl

public void setUrl(java.lang.String newUrl)
Sets the URL to be redirected to when the command completes successfully.
Specified by:
setUrl in interface OrderItemMoveCmd

validateParameters

public void validateParameters()
                        throws ECException
Performs server side parameter checking.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
ECException. -