com.ibm.commerce.fulfillment.commands
Class CheckInventoryAvailabilityCmdImpl
java.lang.Object
CacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.TaskCommandImpl
com.ibm.commerce.fulfillment.commands.CheckInventoryAvailabilityCmdImpl
- All Implemented Interfaces:
- CheckInventoryAvailabilityCmd, ECCommand, ECTargetableCommand, TaskCommand
- public class CheckInventoryAvailabilityCmdImpl
- extends TaskCommandImpl
- implements CheckInventoryAvailabilityCmd
The default implementation of the CheckInventoryAvailability task command interface.
Refer to the performExecute method for a description of its behaviour.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
COPYRIGHT
IBM copyright notice field. |
static java.lang.String |
ERR_CHECK_INV
The value set for the "errorCode" name value pair set in the ECApplicationException thrown when an item is not available. |
protected static java.lang.String |
istrPerformFunc
Deprecated. Will be changed to private. |
protected static java.lang.String |
istrThisClass
Deprecated. Will be changed to private. |
Method Summary |
Item |
getCatEntry()
Deprecated. This method will be changed to protected. |
java.util.Vector |
getCatEntryFulfillmentCenters()
Deprecated. This method will be changed to protected. |
java.util.Hashtable |
getOrderItemFulfillmentCentersMaps()
Deprecated. This method will be changed to protected. |
java.util.Enumeration |
getOrderItems()
Deprecated. This method will be changed to protected. |
java.lang.String |
getUnitOfMeasure()
Deprecated. This method will be changed to protected. |
void |
performExecute()
Performs the actual business logic of the command. |
void |
reset()
This method should be called after a command has been executed to reset its instance variables. |
void |
setCatEntry(Item aCatEntry)
Sets the item to be checked. |
void |
setCatEntryFulfillmentCenters(java.util.Vector avCatEntryFulfillmentCenters)
Sets the list of fulfillment center identifiers for the 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 aenOrderItems)
Sets the items to be checked. |
void |
setStoreId(java.lang.Integer aStoreId)
Deprecated. This method has no effect. |
void |
setUnitOfMeasure(java.lang.String astrUnitOfMeasure)
Sets the unit of measure for the quantity of the Item specified by the 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 |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright notice field.
- See Also:
- Constant Field Values
istrThisClass
protected static java.lang.String istrThisClass
- Deprecated. Will be changed to private.
istrPerformFunc
protected static java.lang.String istrPerformFunc
- Deprecated. Will be changed to private.
ERR_CHECK_INV
public static final java.lang.String ERR_CHECK_INV
- The value set for the "errorCode" name value pair set in the ECApplicationException thrown when an item is not available.
- See Also:
- Constant Field Values
CheckInventoryAvailabilityCmdImpl
public CheckInventoryAvailabilityCmdImpl()
getOrderItems
public java.util.Enumeration getOrderItems()
- Deprecated. This method will be changed to protected.
- Gets the items to be checked.
-
- Returns:
- the items to be checked (Enumeration of OrderItemAccessBean).
getOrderItemFulfillmentCentersMaps
public java.util.Hashtable getOrderItemFulfillmentCentersMaps()
- Deprecated. This method will be changed to protected.
- Gets lists of fulfillment centers to check inventory for items specified by the setOrderItems method.
-
- Returns:
- lists of fulfillment centers keyed by the order item id. Hashtable:
getCatEntry
public Item getCatEntry()
- Deprecated. This method will be changed to protected.
- Gets the item to be checked. If the store identifier of the Item is null, the store identifier from the command context is used.
-
- Returns:
- the store identifier, catalog entry identifier, and quantity of the Item are used.
getCatEntryFulfillmentCenters
public java.util.Vector getCatEntryFulfillmentCenters()
- Deprecated. This method will be changed to protected.
- Gets the list of fulfillment center identifiers for the Item specified by the setCatEntry method.
-
- Returns:
- the list of fulfillment center identifiers (Vector of Integer).
getUnitOfMeasure
public java.lang.String getUnitOfMeasure()
- Deprecated. This method will be changed to protected.
- Gets the unit of measure for the quantity of the Item specified by the setCatEntry method.
If it is null, then the quantity of the Item is multiplied by the nominal quantity and unit of measure specified in the CATENTSHIP record for the CatalogEntry.
-
- Returns:
- the unit of measure, or null.
performExecute
public void performExecute()
throws ECException
- Performs the actual business logic of the command.
-
- Specified by:
- performExecute in interface ECCommand
- Overrides:
- performExecute in class AbstractECTargetableCommand
-
- Throws:
- ECException
- ECSystemException - a system error occurred.
- ECApplicationException - availability times cannot be determined for one or more items. The message is set to ECMessage._API_BAD_INV, the error task name is set to CheckInventoryCmd.ERRTASK_NAME, and the following name value pairs are set in the TypedProperty exception data:
- ErrorCode is set to "1001"
- storeId is set to a Vector of Integer store identifiers of store that were checked, one for each item.
- catEntryId is set to a Vector of Long catalog entry identifiers of catalog items, one for each item.
- quantity is set to a Vector of Integer quantity amounts, representing amounts in units as defined by the BaseItem for the specified item of the catalog item, one for each item.
- fulfillmentCenterId is set to a Vector of Vectors of Integer fulfillment center identifiers of the fulfillment centers that were checked for the specified item of the catalog item, one Vector of fulfillment center identifiers for each item.
reset
public void reset()
- This method should be called after a command has been executed to reset its instance variables.
-
- Overrides:
- reset in class AbstractECTargetableCommand
setOrderItems
public void setOrderItems(java.util.Enumeration aenOrderItems)
- Sets the items to be checked.
-
- Specified by:
- setOrderItems in interface CheckInventoryAvailabilityCmd
-
- Parameters:
- aenOrderItems - the items to be checked (Enumeration of OrderItemAccessBean).
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:
- newOrderItemFulfillmentCentersMaps - lists of fulfillment centers keyed by the order item id. Hashtable:
setStoreId
public void setStoreId(java.lang.Integer aStoreId)
- Deprecated. This method has no effect.
- Sets the identifier of the store to be checked.
-
- Specified by:
- setStoreId in interface CheckInventoryAvailabilityCmd
-
- Parameters:
- aStoreId - the Store identifier.
setCatEntry
public void setCatEntry(Item aCatEntry)
- Sets the item to be checked. If the store identifier of the Item is null, the store identifier from the command context is used.
-
- Specified by:
- setCatEntry in interface CheckInventoryAvailabilityCmd
-
- Parameters:
- aCatEntry - the store identifier, catalog entry identifier, and quantity of the Item are used.
setCatEntryFulfillmentCenters
public void setCatEntryFulfillmentCenters(java.util.Vector avCatEntryFulfillmentCenters)
- Sets the list of fulfillment center identifiers for the Item specified by setCatEntry method.
-
- Specified by:
- setCatEntryFulfillmentCenters in interface CheckInventoryAvailabilityCmd
-
- Parameters:
- avCatEntryFulfillmentCenters - list of fulfillment center identifiers (Vector of Integer).
setUnitOfMeasure
public void setUnitOfMeasure(java.lang.String astrUnitOfMeasure)
- Sets the unit of measure for the quantity of the Item specified by the setCatEntry method.
This method is optional. If it is not called, then the quantity of the Item is multiplied by the nominal quantity and unit of measure specified in the CATENTSHIP record for the CatalogEntry.
-
- Specified by:
- setUnitOfMeasure in interface CheckInventoryAvailabilityCmd
-
- Parameters:
- astrUnitOfMeasure - unit of measure.
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.