public class InventoryBaseCmdImpl extends TaskCommandImpl implements CheckInventoryCmd, UpdateInventoryCmd, ReverseUpdateInventoryCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHECK_INVENTORY |
static java.lang.String |
COPYRIGHT
the internal copyright field
|
static java.lang.String |
ERR_CHECK_INV |
static int |
NO_CHECK |
static int |
NO_RECOMMENDATION |
static int |
NO_UPDATE |
static java.lang.String |
REVERSE_UPDATE_INVENTORY |
static java.lang.String |
UPDATE_INVENTORY |
defaultCommandClassName, ERRTASK_NAME, NAME
defaultCommandClassName, ERRTASK_NAME, NAME
defaultCommandClassName, ERRTASK_NAME, NAME
Constructor and Description |
---|
InventoryBaseCmdImpl() |
Modifier and Type | Method and Description |
---|---|
InventoryAccessBean |
findInventory(java.lang.Long catalogEntryId,
java.lang.Integer fulfillmentCenterId,
java.lang.Integer inventoryStoreId)
This method is to find inventory for specified catalog entry id, fulfillment center id and store id.
|
java.lang.Integer |
getAllocatedQuantity() |
java.lang.String |
getIstrContinue()
Returns the istrContinue.
|
java.util.Vector |
getOutOfInventoryOrderItems()
Return a Vector of OrderItems that are not available in inventory
|
boolean |
isReadyToCallExecute()
This method is called by the Targettable Command frame work before the execution of the command.
|
void |
performExecute()
Executes the main Business Logic of this Command
|
void |
reset()
reset iAllocatedQuantity
|
void |
setAllocatedQuantity(java.lang.Integer allocatedQuantity)
Set the allocated quantity which need to reverse.
|
void |
setCatEntryId(java.lang.Long aCatEntryId)
Set a Catalog Entry Id.
|
void |
setContinue(java.lang.String aContinue)
Set the istrContinue.
|
void |
setFulfillmentCenterId(java.lang.Integer aFulfillmentCenterId)
Set a fulfillment center Id.
|
void |
setIstrContinue(java.lang.String aIstrContinue)
Sets the istrContinue.
|
void |
setOrderItem(OrderItemAccessBean anOrderItem)
Set an OrderItem.
|
void |
setOrderItem(OrderItemAccessBean[] orderItems)
Set a list of OrderItems.
|
void |
setOrderItem(java.util.Vector anOrderItemList)
Set a list of OrderItems.
|
void |
setQuantity(java.lang.Double aQuantity)
Set a quantity.
|
void |
setQuantityMeasure(java.lang.String quantityMeasure)
Set a quantity measure.
|
void |
setReturnErrorIfNoInventory(boolean returnError)
Sets the iReturnError with boolean value
|
void |
setStoreId(java.lang.Integer aStoreId)
Set a store id.
|
void |
validateParameters()
Validates parameters.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
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
public static final java.lang.String COPYRIGHT
public static final java.lang.String ERR_CHECK_INV
public static final java.lang.String CHECK_INVENTORY
public static final java.lang.String UPDATE_INVENTORY
public static final java.lang.String REVERSE_UPDATE_INVENTORY
public static final int NO_UPDATE
public static final int NO_CHECK
public static final int NO_RECOMMENDATION
public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- ECCommand.performExecute()
public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand
public void setCatEntryId(java.lang.Long aCatEntryId)
setCatEntryId
in interface CheckInventoryCmd
setCatEntryId
in interface ReverseUpdateInventoryCmd
setCatEntryId
in interface UpdateInventoryCmd
aCatEntryId
- sets iCatEntryIdpublic void setFulfillmentCenterId(java.lang.Integer aFulfillmentCenterId)
setFulfillmentCenterId
in interface CheckInventoryCmd
setFulfillmentCenterId
in interface ReverseUpdateInventoryCmd
setFulfillmentCenterId
in interface UpdateInventoryCmd
aFulfillmentCenterId
- set iFulfillmentCenterIdpublic void setOrderItem(OrderItemAccessBean[] orderItems)
setOrderItem
in interface CheckInventoryCmd
setOrderItem
in interface ReverseUpdateInventoryCmd
setOrderItem
in interface UpdateInventoryCmd
orderItems
- sets iOrderItemspublic void setOrderItem(OrderItemAccessBean anOrderItem)
setOrderItem
in interface CheckInventoryCmd
setOrderItem
in interface ReverseUpdateInventoryCmd
setOrderItem
in interface UpdateInventoryCmd
anOrderItem
- sets iOrderItemspublic void setOrderItem(java.util.Vector anOrderItemList)
setOrderItem
in interface CheckInventoryCmd
setOrderItem
in interface ReverseUpdateInventoryCmd
setOrderItem
in interface UpdateInventoryCmd
anOrderItemList
- sets iOrderItemspublic void setQuantity(java.lang.Double aQuantity)
setQuantity
in interface CheckInventoryCmd
setQuantity
in interface ReverseUpdateInventoryCmd
setQuantity
in interface UpdateInventoryCmd
aQuantity
- sets iQuantitypublic void setQuantityMeasure(java.lang.String quantityMeasure)
setQuantityMeasure
in interface CheckInventoryCmd
setQuantityMeasure
in interface ReverseUpdateInventoryCmd
setQuantityMeasure
in interface UpdateInventoryCmd
quantityMeasure
- sets iQuantityMeasurepublic void setStoreId(java.lang.Integer aStoreId)
setStoreId
in interface CheckInventoryCmd
setStoreId
in interface ReverseUpdateInventoryCmd
setStoreId
in interface UpdateInventoryCmd
aStoreId
- sets iStoreIdpublic void validateParameters() throws ECException
CatEntry
and Quantity values should be associated with an OrderItem
otherwise ParameterNotFoundException
is thrownvalidateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException
public java.util.Vector getOutOfInventoryOrderItems()
getOutOfInventoryOrderItems
in interface CheckInventoryCmd
public void setReturnErrorIfNoInventory(boolean returnError)
setReturnErrorIfNoInventory
in interface CheckInventoryCmd
returnError
- to set iReturnErrorpublic java.lang.String getIstrContinue()
public void setIstrContinue(java.lang.String aIstrContinue)
aIstrContinue
- The istrContinue to setpublic void setContinue(java.lang.String aContinue)
setContinue
in interface CheckInventoryCmd
aContinue
- to set istrContinuepublic java.lang.Integer getAllocatedQuantity()
public void setAllocatedQuantity(java.lang.Integer allocatedQuantity)
ReverseUpdateInventoryCmd
setAllocatedQuantity
in interface ReverseUpdateInventoryCmd
allocatedQuantity
- The iAllocatedQuantity to set.public InventoryAccessBean findInventory(java.lang.Long catalogEntryId, java.lang.Integer fulfillmentCenterId, java.lang.Integer inventoryStoreId) throws ECException
storerel
, this method behave as below:
storerel
. Then, find inventory from those
related stores in turn (no sequence) until finding any inventory recordcatalogEntryId
- fulfillmentCenterId
- inventoryStoreId
- ECException