public class CheckInventoryAvailabilityBECmdImpl extends TaskCommandImpl implements CheckInventoryAvailabilityCmd
Behaviour
The input item(s) are updated or split with available quantity, estimatedAvailabilityTime and shippingOffset information.
If the available inventory is not sufficient, then throws an exception.
For single level, the following has been moved to the AvailInvStore and AvailRADate stored procedures: static kits, function that was provided by this class in WebSphere Commerce versions 5.5 and 5.6 .
Modifier and Type | Field and Description |
---|---|
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.
|
static java.lang.String |
PARTNUMBER
The PARTNUMBER string.
|
static java.lang.String |
QUANTITY
The QUANTITY string.
|
static java.lang.String |
STOREID
The STOREID string.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
CheckInventoryAvailabilityBECmdImpl() |
Modifier and Type | Method and Description |
---|---|
Item |
getCatEntry()
This method 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 aCatEntry)
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 ahsOrderItemFulfillmentCentersMaps)
Sets lists of fulfillment centers to check inventory for items specified by the setOrderItems method.
|
void |
setOrderItems(java.util.Enumeration aenOrderItems)
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.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
public static final java.lang.String COPYRIGHT
public static final java.lang.String ERR_CHECK_INV
ERR_CHECK_INV
value.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
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 it will 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 interface com.ibm.websphere.command.TargetableCommand
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 is 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 interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand
CheckInventoryAvailabilityCmdImpl.reset()
public void setCatEntry(Item aCatEntry)
setCatEntry
in interface CheckInventoryAvailabilityCmd
aCatEntry
- Item representing the catalog entry and quantity to check in inventory.CheckInventoryAvailabilityCmdImpl.setCatEntry(Item)
public void setCatEntryFulfillmentCenters(java.util.Vector avCatEntryFulfillmentCenters)
setCatEntryFulfillmentCenters
in interface CheckInventoryAvailabilityCmd
avCatEntryFulfillmentCenters
- list of fulfillment centers.CheckInventoryAvailabilityCmdImpl.setCatEntryFulfillmentCenters(Vector)
public void setOrderItemFulfillmentCentersMaps(java.util.Hashtable ahsOrderItemFulfillmentCentersMaps)
setOrderItemFulfillmentCentersMaps
in interface CheckInventoryAvailabilityCmd
ahsOrderItemFulfillmentCentersMaps
- lists of fulfillment centers keyed by the order item idCheckInventoryAvailabilityCmdImpl.setOrderItemFulfillmentCentersMaps(Hashtable)
public void setOrderItems(java.util.Enumeration aenOrderItems)
setOrderItems
in interface CheckInventoryAvailabilityCmd
aenOrderItems
- items to check inventoryCheckInventoryAvailabilityCmdImpl.setOrderItems(Enumeration)
public void setStoreId(java.lang.Integer newStoreId)
setStoreId
in interface CheckInventoryAvailabilityCmd
newStoreId
- the store id to useCheckInventoryAvailabilityCmdImpl.setStoreId(Integer)
public void setUnitOfMeasure(java.lang.String astrUnitOfMeasure)
setUnitOfMeasure
in interface CheckInventoryAvailabilityCmd
astrUnitOfMeasure
- unit of measure.CheckInventoryAvailabilityCmdImpl.setUnitOfMeasure(String)