com.ibm.commerce.fulfillment.commands
Class AllocateExpectedInventoryCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.fulfillment.commands.AllocateExpectedInventoryCmdImpl
All Implemented Interfaces:
AllocateExpectedInventoryCmd, ECCommand, ECTargetableCommand, TaskCommand

public class AllocateExpectedInventoryCmdImpl
extends TaskCommandImpl
implements AllocateExpectedInventoryCmd

The default implementation of the AllocateExpectedInventory task command interface. Refer to the performExecute method for a description of its behaviour.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
protected static java.lang.String istrCheckParametersFunc
          Deprecated. Will be changed to private.
protected static java.lang.String istrPerformFunc
          Deprecated. Will be changed to private.
protected static java.lang.String istrThisClass
          Deprecated. Will be changed to private.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.fulfillment.commands. AllocateExpectedInventoryCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
AllocateExpectedInventoryCmdImpl()
           
 
Method Summary
 java.util.Vector getFulfillmentCenters()
          Deprecated. This method will be changed to protected.
  OrderItemAccessBean getOrderItem()
          Deprecated. This method will be changed to protected.
 void performExecute()
          Performs the actual business logic of the command.
 void setFulfillmentCenters(java.util.Vector newFulfillmentCenters)
          Sets a prioritized list of fulfillment centers from which the inventory should be backordered.
 void setOrderItem( OrderItemAccessBean anOrderItem)
          Sets the order item for which expected inventory is to be backordered.
 void validateParameters()
          Performs server side parameter checking.
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, 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

istrThisClass

protected static java.lang.String istrThisClass
Deprecated. Will be changed to private.

istrPerformFunc

protected static java.lang.String istrPerformFunc
Deprecated. Will be changed to private.

istrCheckParametersFunc

protected static java.lang.String istrCheckParametersFunc
Deprecated. Will be changed to private.
Constructor Detail

AllocateExpectedInventoryCmdImpl

public AllocateExpectedInventoryCmdImpl()
Method Detail

getFulfillmentCenters

public java.util.Vector getFulfillmentCenters()
Deprecated. This method will be changed to protected.
Gets the prioritized list of fulfillment centers from which the inventory should be backordered.
Returns:
the prioritized list of fulfillment center identifiers (Vector of Integer).

getOrderItem

public OrderItemAccessBean getOrderItem()
Deprecated. This method will be changed to protected.
Gets the order item for which expected inventory is to be allocated.
Returns:
the order item.

performExecute

public void performExecute()
                    throws ECException
Performs the actual business logic of the command. Behaviour
  1. If the order item is suitable for backordering (i.e. its inventoryStatus attribute specifies unallocated), it is backordered at one of the fulfillment centers that provide the earliest expected availability time. The order item is updated to reflect the backorder.
  2. Otherwise, the order item is not changed.

Note: the defaultBackorderOffset Store attribute specifies that a Store always expects more inventory to become available within the specified number of seconds. In this default implementation of the AllocateExpectedInventory task command, expected inventory can be allocated directly from Expected Inventory Records (in the RA and RADETAIL database tables), or expected inventory can be allocated based on the expectation represented by the defaultBackorderOffset Store attribute. When more than one fulfillment center can provide the earliest expected availability time, preference is given to those that can allocate directly from Expected Inventory Records. This default implementation of the AllocateExpectedInventory task command calls the backorderitem database stored procedure.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

setFulfillmentCenters

public void setFulfillmentCenters(java.util.Vector newFulfillmentCenters)
Sets a prioritized list of fulfillment centers from which the inventory should be backordered.
Specified by:
setFulfillmentCenters in interface AllocateExpectedInventoryCmd
Parameters:
newFulfillmentCenters - a prioritized list of fulfillment center identifiers (Vector of Integer).

setOrderItem

public void setOrderItem(OrderItemAccessBean anOrderItem)
Sets the order item for which expected inventory is to be backordered.
Specified by:
setOrderItem in interface AllocateExpectedInventoryCmd
Parameters:
anOrderItem - the order item to be backordered.

validateParameters

public void validateParameters()
                        throws ECException
Performs server side parameter checking.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException - thrown when the order item or the fulfillment centers have not been set.