com.ibm.commerce.inventory.commands

Class AdjustInventoryCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, AdjustInventoryCmd, 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 AdjustInventoryCmdImpl
    extends TaskCommandImpl
    implements AdjustInventoryCmd
    Default implementation of the CreateInventoryCmd interface. Creates inventory of an item at a fulfillment center.

    This command will create inventory with specified catEntryId,fulfillmentCenterId,quantity

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AdjustInventoryCmdImpl

        public AdjustInventoryCmdImpl()
    • Method Detail

      • setCatEntryId

        public void setCatEntryId(java.lang.Long catEntry_id)
        This method sets the catEntry parameters to check inventory It is optional if order item is set
        Specified by:
        setCatEntryId in interface AdjustInventoryCmd
        Parameters:
        catEntry_id -
      • setQuantity

        public void setQuantity(java.lang.String newQuantity)
        This method sets the quantity to the new created inventory
        Specified by:
        setQuantity in interface AdjustInventoryCmd
        Parameters:
        newQuantity -
      • getCatEntryId

        public java.lang.Long getCatEntryId()
        This method returns the catEntryId
        Specified by:
        getCatEntryId in interface AdjustInventoryCmd
        Returns:
        catEntry_id
      • getQuantity

        public java.lang.String getQuantity()
        This method returns the quantity
        Specified by:
        getQuantity in interface AdjustInventoryCmd
        Returns:
        quantity
      • setQuantityMeasure

        public void setQuantityMeasure(java.lang.String newQuantityMeasure)
        This method sets the quantity measure
        Specified by:
        setQuantityMeasure in interface AdjustInventoryCmd
        Parameters:
        newQuantityMeasure -
      • getQuantityMeasure

        public java.lang.String getQuantityMeasure()
        This method returns the quantity
        Specified by:
        getQuantityMeasure in interface AdjustInventoryCmd
        Returns:
        quantity
      • setFulfillmentCenterId

        public void setFulfillmentCenterId(java.lang.Integer fulfillmentCenter_id)
        This method sets the fulfillmentCenter parameters to check inventory on It is optional if order item is set
        Specified by:
        setFulfillmentCenterId in interface AdjustInventoryCmd
        Parameters:
        fulfillmentCenter_id -
      • setStoreId

        public void setStoreId(java.lang.Integer storeId)
        This method sets a store id to check the inventory.
        Specified by:
        setStoreId in interface AdjustInventoryCmd
        Parameters:
        storeId - integer
      • setFlagCheck

        public void setFlagCheck(java.lang.String newFlag)
        This method sets flagCheck
        Specified by:
        setFlagCheck in interface AdjustInventoryCmd
        Parameters:
        newFlag -
      • setFlagUpdate

        public void setFlagUpdate(java.lang.String newFlag)
        This method sets flagUpdate
        Specified by:
        setFlagUpdate in interface AdjustInventoryCmd
        Parameters:
        newFlag -
      • reset

        public void reset()
        Resets the command local variable.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        Ready to be executed.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        Always true.
      • validateParameters

        public void validateParameters()
                                throws ECException

        Checks the information of the receipt to be created. Make sure all the required parameters were passed in, or collected from somewhere. Fields required to be set beforehand

        • store id in command context
        • fulfillment center id
        • receipt date
        • quantity received
        • need at least one of the following:
          • record detail and vendor id
          • version id
          • item specified id
          • member id and part number
        Specified by:
        validateParameters in interface ECCommand
        Overrides:
        validateParameters in class AbstractECTargetableCommand
        Throws:
        ECException - If mandatory parameters are not passed in, throw ECApplicationException specifying _ERR_BAD_MISSING_CMD_PARAMETER, _ERR_DIDNT_SET_MERCHANT
      • performExecute

        public void performExecute()
                            throws ECException
        This method performs the execution of creating an inventory.

        If the receipt is created successfully, the inventory identifier will be returned

        Utilizes the following beans

        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException -
        • ECSystemException Create error, _ERR_CREATE_EXCEPTION
        • ECSystemException Finder error, _ERR_FINDER_EXCEPTION
        • ECSystemException Naming error, _ERR_NAMING_EXCEPTION
        • ECSystemException Remote error, _ERR_REMOTE_EXCEPTION