java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.fulfillment.commands.CheckInventoryAvailabilityBECmdImpl
Checks that either there is sufficient existing inventory for a list of items from a backend. The backend can return schedule line items.
Behaviour
The input item(s) are updated or split with availble quantity, estimatedAvailabilityTime and shippingOffset information.
If the available inventory is not sufficient, then throws an exception.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM Copyright notice |
static java.lang.String |
ERR_CHECK_INV The ERR_CHECK_INV value. |
static java.lang.Integer |
iStoreId The storeId on whose behalf we are searching. |
protected
static java.lang.String |
istrPerformFunc The performExecute() method name. |
protected
static java.lang.String |
istrThisClass The name of this class. |
static java.lang.String |
PARTNUMBER The PARTNUMBER string. |
static java.lang.String |
QUANTITY The QUANTITY string. |
static java.lang.String |
STOREID The STOREID string. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.fulfillment.commands. CheckInventoryAvailabilityCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CheckInventoryAvailabilityBECmdImpl() |
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 the map storing lists of fulfillment centers to check for order items. |
java.util.Enumeration |
getOrderItems() Gets items to check for in 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 in the inventory. |
void |
setCatEntryFulfillmentCenters(java.util.Vector avCatEntryFulfillmentCenters) Sets a list of fulfillment centers to check for the item specified by the 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) Sets 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. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
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
protected static java.lang.String istrThisClass
protected static java.lang.String istrPerformFunc
performExecute()
method name.
public static final java.lang.String ERR_CHECK_INV
public static java.lang.Integer iStoreId
public static final java.lang.String PARTNUMBER
public static final java.lang.String QUANTITY
public static final java.lang.String STOREID
Constructor Detail |
---|
public CheckInventoryAvailabilityBECmdImpl()
Method Detail |
---|
public Item getCatEntry()
CheckInventoryAvailabilityCmdImpl.getCatEntry()
public java.util.Vector getCatEntryFulfillmentCenters()
CheckInventoryAvailabilityCmdImpl.getCatEntryFulfillmentCenters()
public java.util.Hashtable getOrderItemFulfillmentCentersMaps()
CheckInventoryAvailabilityCmdImpl.getOrderItemFulfillmentCentersMaps()
public java.util.Enumeration getOrderItems()
public java.lang.String getUnitOfMeasure()
CheckInventoryAvailabilityCmdImpl.getUnitOfMeasure()
public void performExecute() throws ECException
OrderItemAccessBean
's: for each order item
found, it will get the item id, quantity required, store id, then try to get a
list of fulfillment centers that may have this item in stock (if none found
then throw ECException). Now pass the information obtained to the
checkInventoryFromBE
method to actually do the work of finding out
if the orders can be satisfied. Note that the ienOrderitems
attribute should be set before invoking this method, using the
setOrderItems()
method.
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
- thrown if no fulfillment centers have this item id in their inventory; also
thrown if any EJB exception occur during the processing of this command. Raised
ECApplicationException with ERR_BAD_MISSING_CMD_PARAMETER message when the
vector storing the fulfillment centers are empty. Raised with
ERR_REMOTE_EXCEPTION message when it encounters a RemoteException. Raised with
ERR_CREATE_EXCEPTION message when it encounters a CreateException. Raised with
ERR_NAMING_EXCEPTION message when it encounters a NamingException. Raised with
ERR_FINDER_EXCEPTION message when it encounters a
FinderException.public void reset()
reset
in class
AbstractECTargetableCommand
CheckInventoryAvailabilityCmdImpl.reset()
public void setCatEntry(Item newCatEntry)
setCatEntry
in interface
CheckInventoryAvailabilityCmd
newCatEntry
- the store identifier, catalog entry identifier,
and quantity of the Item are used.CheckInventoryAvailabilityCmdImpl.setCatEntry()
public void setCatEntryFulfillmentCenters(java.util.Vector avCatEntryFulfillmentCenters)
setCatEntryFulfillmentCenters
in interface
CheckInventoryAvailabilityCmd
avCatEntryFulfillmentCenters
- list of fulfillment
centers.CheckInventoryAvailabilityCmdImpl.setCatEntryFulfillmentCenters()
public void setOrderItemFulfillmentCentersMaps(java.util.Hashtable newOrderItemFulfillmentCentersMaps)
setOrderItemFulfillmentCentersMaps
in interface
CheckInventoryAvailabilityCmd
newOrderItemFulfillmentCentersMaps
- lists of fulfillment
centers keyed by the order item id. Hashtable:
OrderItemAccessBean
) The order item.CheckInventoryAvailabilityCmdImpl.setOrderItemFulfillmentCentersMaps()
public void setOrderItems(java.util.Enumeration newOrderItems)
setOrderItems
in interface
CheckInventoryAvailabilityCmd
newOrderItems
- the items to be checked (Enumeration of
OrderItemAccessBean
).CheckInventoryAvailabilityCmdImpl.setOrderitems()
public void setStoreId(java.lang.Integer newStoreId)
setStoreId
in interface
CheckInventoryAvailabilityCmd
newStoreId
- the store id to useCheckInventoryAvailabilityCmdImpl.setStoreId()
public void setUnitOfMeasure(java.lang.String astrUnitOfMeasure)
setUnitOfMeasure
in interface
CheckInventoryAvailabilityCmd
astrUnitOfMeasure
- unit of measure.CheckInventoryAvailabilityCmdImpl.setUnitOfMeasure()