com.ibm.commerce.fulfillment.commands

Class CheckInventoryAvailabilityBECmdImpl

  • 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 CheckInventoryAvailabilityBECmdImpl
    extends TaskCommandImpl
    implements CheckInventoryAvailabilityCmd
    Checks that either there is sufficient existing inventory for a list of items from a backend. The backend can return schedule line items.

    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 .

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice
        See Also:
        Constant Field Values
      • ERR_CHECK_INV

        public static final java.lang.String ERR_CHECK_INV
        The ERR_CHECK_INV value.
        See Also:
        Constant Field Values
      • iStoreId

        public static java.lang.Integer iStoreId
        The storeId on whose behalf we are searching.
      • PARTNUMBER

        public static final java.lang.String PARTNUMBER
        The PARTNUMBER string.
        See Also:
        Constant Field Values
      • QUANTITY

        public static final java.lang.String QUANTITY
        The QUANTITY string.
        See Also:
        Constant Field Values
      • STOREID

        public static final java.lang.String STOREID
        The STOREID string.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CheckInventoryAvailabilityBECmdImpl

        public CheckInventoryAvailabilityBECmdImpl()
    • Method Detail

      • getOrderItemFulfillmentCentersMaps

        public java.util.Hashtable getOrderItemFulfillmentCentersMaps()
        Gets the map storing lists of fulfillment centers to check for order items.
        Returns:
        lists of fulfillment centers to check inventory for items specified by the setOrderItems method.
        See Also:
        CheckInventoryAvailabilityCmdImpl.getOrderItemFulfillmentCentersMaps()
      • getOrderItems

        public java.util.Enumeration getOrderItems()
        Gets items to check for in inventory.
        Returns:
        Enumeration of order items
      • getUnitOfMeasure

        public java.lang.String getUnitOfMeasure()
        Gets the unit of measure to check inventory for an item specified by setCatEntry method.
        Returns:
        unit of measure used to check inventory
        See Also:
        CheckInventoryAvailabilityCmdImpl.getUnitOfMeasure()
      • performExecute

        public void performExecute()
                            throws ECException
        Contains the actual business logic of the command. This method will iterate through the list of 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.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        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.