com.ibm.commerce.fulfillment.commands

Class 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 the CheckInventoryAvailability 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 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
    • Constructor Detail

      • CheckInventoryAvailabilityCmdImpl

        public CheckInventoryAvailabilityCmdImpl()
    • 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:
      • 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 interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        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. 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 interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • 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:
        ahsOrderItemFulfillmentCentersMaps - 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 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 interface CheckInventoryAvailabilityCmd
        Parameters:
        astrUnitOfMeasure - unit of measure.