com.ibm.commerce.fulfillment.commands
Class CheckInventoryAvailabilityCmdImpl

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

public class CheckInventoryAvailabilityCmdImpl
extends TaskCommandImpl
implements CheckInventoryAvailabilityCmd

Checks that either there is sufficient existing inventory for a list of items, or that they could be backordered.

Behaviour

The input item(s) are updated with estimatedAvailabilityTime and shippingOffset information.


Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String ERR_CHECK_INV
           
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.CheckInventoryAvailabilityCmd
defaultCommandClassName, NAME
 
Constructor Summary
CheckInventoryAvailabilityCmdImpl()
           
 
Method Summary
 Item getCatEntry()
          Gets an item to check inventory for.
 java.util.Vector getCatEntryFulfillmentCenters()
          Gets a list of fulfillment centers for an item specified by setCatEntry method.
 java.util.Hashtable getOrderItemFulfillmentCentersMaps()
          Gets lists of fulfillment centers to check inventory for items specified by the setOrderItems method.
 java.util.Enumeration getOrderItems()
          Gets items to check inventory.
 java.lang.String getUnitOfMeasure()
          Gets the unit of measure to check inventory for an item specified by setCatEntry method.
 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 states variables.
 void setCatEntry(Item newCatEntry)
          Sets an item to check the inventory.
 void setCatEntryFulfillmentCenters(java.util.Vector avCatEntryFulfillmentCenters)
          Sets a list of fulfillment centers for an item specified by setCatEntry method.
 void setOrderItemFulfillmentCentersMaps(java.util.Hashtable newOrderItemFulfillmentCentersMaps)
          Sets lists of fulfillment centers to check inventory for items specified by the setOrderItems method.
 void setOrderItems(java.util.Enumeration newOrderItems)
          Sets items to check inventory.
 void setStoreId(java.lang.Integer newStoreId)
          Set a store id to check the inventory.
 void setUnitOfMeasure(java.lang.String astrUnitOfMeasure)
          Sets the unit of measure to check inventory for an item specified by setCatEntry method.
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 
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, validateParameters
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT

ERR_CHECK_INV

public static final java.lang.String ERR_CHECK_INV

istrPerformFunc

protected static java.lang.String istrPerformFunc

istrThisClass

protected static java.lang.String istrThisClass
Constructor Detail

CheckInventoryAvailabilityCmdImpl

public CheckInventoryAvailabilityCmdImpl()
Method Detail

getCatEntry

public Item getCatEntry()
Gets an item to check inventory for.
Returns:
java.lang.Long Item representing the catalog entry and quantity to check inventory.

getCatEntryFulfillmentCenters

public java.util.Vector getCatEntryFulfillmentCenters()
Gets a list of fulfillment centers for an item specified by setCatEntry method.

getOrderItemFulfillmentCentersMaps

public java.util.Hashtable getOrderItemFulfillmentCentersMaps()
Gets lists of fulfillment centers to check inventory for items specified by the setOrderItems method.

getOrderItems

public java.util.Enumeration getOrderItems()
Gets items to check inventory.

getUnitOfMeasure

public java.lang.String getUnitOfMeasure()
Gets the unit of measure to check inventory for an item specified by setCatEntry method.

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.

reset

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

setCatEntry

public void setCatEntry(Item newCatEntry)
Sets an item to check the inventory.
Specified by:
setCatEntry in interface CheckInventoryAvailabilityCmd
Parameters:
aCatEntry - Item representing the catalog entry and quantity to check inventory.

setCatEntryFulfillmentCenters

public void setCatEntryFulfillmentCenters(java.util.Vector avCatEntryFulfillmentCenters)
Sets a list of fulfillment centers for an item specified by setCatEntry method.
Specified by:
setCatEntryFulfillmentCenters in interface CheckInventoryAvailabilityCmd
Parameters:
avCatEntryFulfillmentCenters - list of fulfillment centers.

setOrderItemFulfillmentCentersMaps

public void setOrderItemFulfillmentCentersMaps(java.util.Hashtable newOrderItemFulfillmentCentersMaps)
Sets lists of fulfillment centers to check inventory for items specified by the setOrderItems method.
Specified by:
setOrderItemFulfillmentCentersMaps in interface CheckInventoryAvailabilityCmd
Parameters:
ahsOrderItemFulfillmentCentersMaps - lists of fulfillment centers keyed by the order item id

setOrderItems

public void setOrderItems(java.util.Enumeration newOrderItems)
Sets items to check inventory. Each item has an associated prioritized list of fulfillment centers where the check should be made specified by the setOrderItemFulfillmentCentersMaps method.
Specified by:
setOrderItems in interface CheckInventoryAvailabilityCmd
Parameters:
aenOrderItems - items to check inventory

setStoreId

public void setStoreId(java.lang.Integer newStoreId)
Set a store id to check the inventory.
Specified by:
setStoreId in interface CheckInventoryAvailabilityCmd

setUnitOfMeasure

public void setUnitOfMeasure(java.lang.String astrUnitOfMeasure)
Sets the unit of measure to check inventory for an item specified by setCatEntry method.
Specified by:
setUnitOfMeasure in interface CheckInventoryAvailabilityCmd
Parameters:
astrUnitOfMeasure - unit of measure.