com.ibm.commerce.fulfillment.commands
Class CheckInventoryAvailabilityCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.TaskCommandImpl
-
- com.ibm.commerce.fulfillment.commands.CheckInventoryAvailabilityCmdImpl
-
- All Implemented Interfaces:
- com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CheckInventoryAvailabilityCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
public class CheckInventoryAvailabilityCmdImpl extends TaskCommandImpl implements CheckInventoryAvailabilityCmd
The default implementation of theCheckInventoryAvailability
task command interface.
For single level, static kits, function that was provided by this class in WebSphere Commerce versions 5.5 and 5.6 has been moved. It is moved to the AvailInvStore and AvailRADate stored procedures.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description 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.-
Fields inherited from interface com.ibm.commerce.fulfillment.commands.CheckInventoryAvailabilityCmd
defaultCommandClassName, NAME
-
-
Constructor Summary
Constructors Constructor and Description CheckInventoryAvailabilityCmdImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description 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, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
IBM copyright notice field.- See Also:
- Constant Field Values
-
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
-
-
Method Detail
-
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:
- key - (Long) The identifier of the order item.
- value - (
OrderItemAccessBean
) The order item.
-
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 get from the below ways: 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 interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- 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. It represents 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 Integer fulfillment center identifiers of the fulfillment centers. They 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.- Specified by:
reset
in interfacecom.ibm.websphere.command.Command
- Overrides:
reset
in classAbstractECTargetableCommand
-
setOrderItems
public void setOrderItems(java.util.Enumeration aenOrderItems)
Sets the items to be checked.- Specified by:
setOrderItems
in interfaceCheckInventoryAvailabilityCmd
- Parameters:
aenOrderItems
- the items to be checked (Enumeration ofOrderItemAccessBean
).
-
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 interfaceCheckInventoryAvailabilityCmd
- Parameters:
ahsOrderItemFulfillmentCentersMaps
- lists of fulfillment centers keyed by the order item id. Hashtable:- key - (Long) The identifier of the order item.
- value - (
OrderItemAccessBean
) The order item.
-
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 interfaceCheckInventoryAvailabilityCmd
- 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 interfaceCheckInventoryAvailabilityCmd
- 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 interfaceCheckInventoryAvailabilityCmd
- 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 get from the below ways: multiplied by the nominal quantity and unit of measure specified in the CATENTSHIP record for the CatalogEntry.- Specified by:
setUnitOfMeasure
in interfaceCheckInventoryAvailabilityCmd
- Parameters:
astrUnitOfMeasure
- unit of measure.
-
-