com.ibm.commerce.fulfillment.commands
Class AllocateExpectedInventoryCmdImpl

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

public class AllocateExpectedInventoryCmdImpl
extends TaskCommandImpl
implements AllocateExpectedInventoryCmd

Allocates expected inventory for a particular order item at a particular fulfillment center.

Behaviour

The behaviour of the command is:

  1. If the order item is suitable for backordering (i.e. its inventoryStatus attribute specifies unallocated), and there is sufficient expected inventory at one of the specified fulfillment centers (searching in order from first to last in the list of input fulfillment centers ), to completely backorder the quantity needed by the order item, backorder it and update the order item to reflect the backorder.
  2. Otherwise, the order item is not changed.

Note: in our default implementation, some expected inventory is represented by ReplenishmentAdvisments, and some expected inventory is represented by a StoreEntity policy allowing allocation from expected inventory at certain fulfillment centers even when there are no unallocated ReplenishmentAdvisements available (as if there was an expectation of infinite inventory for certain Stores at certain fulfillment centers), as long as the item is not discontinued. For expected inventory represented by policy, the estimated availability time is derived from the policy, represented by the Store.defaultBackorderOffset attribute.


Field Summary
static java.lang.String COPYRIGHT
           
protected static java.lang.String istrCheckParametersFunc
           
protected static java.lang.String istrPerformFunc
           
protected static java.lang.String istrThisClass
           
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.fulfillment.commands.AllocateExpectedInventoryCmd
defaultCommandClassName, NAME
 
Constructor Summary
AllocateExpectedInventoryCmdImpl()
           
 
Method Summary
 java.util.Vector getFulfillmentCenters()
          Gets a prioritized list of fulfillment centers from which the inventory should be allocated.
 OrderItemAccessBean getOrderItem()
          Gets the order item for which expected inventory is to be allocated.
 void performExecute()
          Contains 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 allocated.
 void setOrderItem(OrderItemAccessBean newOrderItem)
          Sets the order item for which expected inventory is to be allocated.
 void validateParameters()
          Performs server side parameter checking.
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, 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, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT

istrCheckParametersFunc

protected static java.lang.String istrCheckParametersFunc

istrPerformFunc

protected static java.lang.String istrPerformFunc

istrThisClass

protected static java.lang.String istrThisClass
Constructor Detail

AllocateExpectedInventoryCmdImpl

public AllocateExpectedInventoryCmdImpl()
Method Detail

getFulfillmentCenters

public java.util.Vector getFulfillmentCenters()
Gets a prioritized list of fulfillment centers from which the inventory should be allocated.

getOrderItem

public OrderItemAccessBean getOrderItem()
Gets the order item for which expected inventory is to be allocated.

performExecute

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

setFulfillmentCenters

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

setOrderItem

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

validateParameters

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