com.ibm.commerce.inventory.beans.commands

Class ProductAvailabilityDataBeanCmdImpl

  • All Implemented Interfaces:
    DataBeanCommand, ECCommand, ECTargetableCommand, com.ibm.commerce.command.TargetableECCommand, ProductAvailabilityDataBeanCmd, 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 ProductAvailabilityDataBeanCmdImpl
    extends DataBeanCommandImpl
    implements ProductAvailabilityDataBeanCmd
    This is the default implementation of the ProductAvailabilityDataBeanCmd task command.

    Input parameters:

    Name Description
    ProductAvailabilityDataBean a databean represents the productAvailability

    Output parameters:

    Name Description
    AvailableDate available date
    FormattedTotalQuantityOnHand total quantity of the product
    ExpectedInventory expected inventory

    Behaviour:

    • check whether the local inventory cache has cached the availability of the product
    • makes the GetProductAvailability outbound service request
    • set the AvailableDate and FormattedTotalQuantityOnHand

    Task commands called:

    See Also:
    Serialized Form
    • Constructor Detail

      • ProductAvailabilityDataBeanCmdImpl

        public ProductAvailabilityDataBeanCmdImpl()
    • Method Detail

      • getInventoryClientFacade

        public InventoryClientFacadeImpl getInventoryClientFacade()
        This method gets the inventory client facade.
        Returns:
        InventoryClientFacadeImpl an InventoryClientFacadeImpl instance.
      • checkLocalExpectedInventory

        public void checkLocalExpectedInventory()
                                         throws ECException,
                                                java.lang.NumberFormatException,
                                                javax.naming.NamingException,
                                                java.sql.SQLException
        This method checks the local expected inventory cache
        Parameters:
        foundCatEntryAB - the catentry to check
        Throws:
        ECException
        java.lang.NumberFormatException
        javax.naming.NamingException
        java.sql.SQLException
      • getInventoryStatus

        public java.lang.String getInventoryStatus()
        This method gets the inventory status
        Returns:
        inventory status
      • setSKU

        public void setSKU(java.lang.String argSku)
        This method sets the sku
        Parameters:
        argSku - Sku to set
      • setFulfillmentCenterIds

        public void setFulfillmentCenterIds(java.lang.Integer[] argFulfillmentCenterIds)
        This method sets the fulfillment center Ids
        Parameters:
        argFulfillmentCenterIds - FulfillmentCenterIds to check
      • getFulfillmentCenterInventory

        public java.util.List getFulfillmentCenterInventory()
        This method gets the fulfillment center inventory
        Returns:
        list FulfillmentCenterInventory
      • getTotalQuantityOnHand

        public QuantityAmount getTotalQuantityOnHand()
        This method gets the total onhand quantity
        Returns:
        QuantityAmount the total onhand quantity
      • getAvailableDate

        public java.sql.Timestamp getAvailableDate()
        This method gets the available date
        Returns:
        Timestamp the available date
      • getExpectedInventory

        public java.util.List getExpectedInventory()
        This method gets the expected inventory
        Returns:
        list the expected inventory
      • getFormattedTotalQuantityOnHand

        public FormattedQuantityAmountDataBean getFormattedTotalQuantityOnHand()
        This method gets the formatted total on hand quantity
        Returns:
        FormattedQuantityAmountDataBean
      • reset

        public void reset()

        This method resets the command fields.

        After this method is invoked, and proper attributes are set, the command can be executed again.

        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand