com.ibm.commerce.inventory.commands

Class DoInventoryActionCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, DoInventoryActionCmd, 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 DoInventoryActionCmdImpl
    extends TaskCommandImpl
    implements DoInventoryActionCmd
    This is the default implementation of the DoInventoryActionCmd task command.

    This is the base interface for the inventory component. This command handles the different inventory models so that the Order component only needs to call this task command with the required inventory operation. This command performs the low level tasks based on the current store's inventorySystem configuration.

    There are 10 usages identified as interfaces between the order commands and this interface command. For every usage, different parameters are required.


    -------------------------------------------------------------------------------

    action=GET_DEFAULT_ATP_PARAMETER, this usage builds default ATP(Available To Promise) parameters to perform inventory operations. During different phases in the order shopping flow, different default inventory behavior is expected. Depending on the current phase, it builds a different ATPParameter value. Different store implementations could request different inventory behavior by passing abbreviated orders, and those abbreviations are used to build ATPParameter. They could also specify a ATPParameter instance to order command, in which case, there is no need to build a default ATPParameter. Every time the order component need to do an inventory operation, the order command must set the ATPParameter again to ensure that the inventory component is synchronized with the changed order.

    Parameters:

    Parameter Name Type Descriptions
    istrCallerCommandName String The command name that requested the default ATPParameter
    istrOrderIds String[] The vector of orderId used to resolve the order items to be backordered, reversed, checked, merged, allocated, or remerged.
    requestProperties TypedProperty The source of the requested inventory operation. This request could originate from either the commandContext.requestProperties, or requestProperties.


    -------------------------------------------------------------------------------

    action=CHECK_INVENTORY, this usage checks the inventory for the OrderItemDisplayCmd and OrderPrepareCmd commands. During OrderItemDisplayCmd processing, it checks the inventory to validate whether the inventory is available. During OrderPrepareCmd processing, for ATP inventory systems, the inventory operation depends on ATPParameter used. For non-ATP inventory systems, it resolves the FFMCENTER_ID and updates it into the order item, and sets the inventoryStatus of the checked orderItem to new inventory status "AVL".

    Parameters:

    Parameter Name Type Descriptions
    istrCallerCommandName String The command name that requested the inventory check.
    istrOrderIds String[] The unique order identifier. The check inventory operation checks all order items belonging to this order.
    atpParameter ATPParameter For ATP inventory systems, the ATPParameter is required to determine which inventory operation is needed


    -------------------------------------------------------------------------------

    action=RESOLVE_FULFILLMENTCENTER, for ATP inventory systems, it gets all eligible FFMCENTER by querying the OrderItemAccessBean. For non-ATP inventory systems, it can resolve the FFMCENTER_ID from either the OrderItemAccessBean or the catentry_id and quantity.

    Parameters:

    Parameter Name Type Descriptions
    istrCallerCommandName String The command name that requested the inventory check.
    items Item[] The order items are considered when determining fulfillment centers. This is required for ATP inventory systems, optional for non-ATP inventory systems.
    catEntry_id String Together with the quantity and quantityMeasure values, this specifies the input to the resolveFulfillmentCenterCmd
    quantity String Together with the catEntry_id and quantityMeasure values, this specifies the input to resolveFulfillmentCenterCmd. This is a catalog quantity
    quantityMeasure String Together with the catEntry_id and quantityMeasure values, this specifies the input to resolveFulfillmentCenterCmd


    -------------------------------------------------------------------------------

    action=UPDATE_FULFILLMENTCENTER, for ATP inventory systems, it checks the inventory without updating the FFMCENTER_ID into the order item. For non-ATP inventory systems, it resolves the fulfillmentCenter and sets this identifier into the Order item.

    Parameters:

    Parameter Name Type Descriptions
    istrCallerCommandName String The command name that requested the inventory check
    istrOrderIds String[] The unique order identifier. This is required.
    iUniqueOrderitemIdList Hashtable The changed order item. This list is used to get unique catentry, to identify the touched orderItem. It is used when adding order items. This is optional for Non-ATP inventory systems, which only need it to resolve ffm for those touched order items.
    FlushNeeded Boolean An optional parameter used to flush the changes to the db for inventory stored procedures. It picks up the changes when new order items have been inserted or order item quantities have changes
    continue String An optional parameter that specifies whether to continue if an exception is thrown by the resolveFuifillmentCenter command.
    atpParameter ATPParameter For ATP inventory systems, the ATPParemeter is required to fulfill inventory operation


    -------------------------------------------------------------------------------

    action=ALLOCATE_INVENTORY, for ATP inventory systems, allocate Inventory(or check Inventory) could happen in order Capture or Order Management. The command OrderPrepareCmd allocates inventory as defined in the ATPParameter. The command OrderProcessCmd forces inventory allocation or backorders the order item. To allocate Inventory during the OrderItemMoveCmd, inventory must be allocated for the order from which the inventory is moved from, and for the order to which the inventory is moved. For non-ATP inventory systems, inventory allocation can only happen on orderProcess. Before non-ATP inventory is allocated, it must first check the inventory status. If this orderItem has ever been allocated, then is compares the allocated quantity with the required quantity. It does nothing if there is no change on the required quantity. Otherwise, first it reverses the allocated quantity, and then updates the inventory for this order item. Finally, it sets the inventoryStatus as Inventory allocated. For no-Inventory systems, only the inventory status is updated.

    Parameters:

    Parameter Name Type Descriptions
    istrCallerCommandName String The command name that requested the inventory check.
    astrInOrders String[] The order to move an order item into. Only used by the OrderItemMoveCmd. An optional parameter, if omitted, the command does nothing.
    astrOutOrders String[] The order from which to move the order item. Only used by the OrderItemMoveCmd. An optional parameter, if omitted, the command does nothing.
    istrOrderIds String[] The unique order identifier. All order items that belong to this order will be allocated during inventory allocation. This parameter is required when allocating inventory.
    atpParameter ATPParameter For ATP inventory systems, the ATPParemeter is required to fulfill inventory operation.


    -------------------------------------------------------------------------------

    action=REVERSE_INVENTORY, for ATP inventory systems, it deallocates existing or expected inventory, and sets the inventoryStatus as not allocated. An orderItem is required. For non-ATP inventory systems, it deallocates inventory.

    Parameters:

    Parameter Name Type Descriptions
    orderItem OrderAccessBean The allocated order item that requires inventory reversal.


    -------------------------------------------------------------------------------

    action=GET_ESTIMATE_AVAILABILITY_DATE, for ATP inventory systems, it calls the CheckInventoryAvailabilityCmd to set an estimated time and shipoffset. For non-ATP inventory systems, it sets the availability time as the current system timestamp plus the value of shippingoffset. The calling command must ensure that the inventory is available before calling this action.

    Parameters:

    Parameter Name Type Descriptions
    ihsAllOrderItems OrderItemAccessBean[] The collection of orderItem for which to get the estimate availability date.
    ihsOrderItemFulfillmentCentersMaps Hashtable An optional parameter for ATP inventory systems.


    -------------------------------------------------------------------------------

    action=RESERVE_INVENTORY, for ATP inventory systems, it calls the command reserveInventoryCmd. For non-ATP inventory systems, it calls the updateInventoryCmd.

    Parameters:

    Parameter Name Type Descriptions
    iCatEntry_id Long A required parameter that specifies the catalog entry for which to reserve Inventory.
    iFulfillmentCenterId Integer The fulfillmentCenter at which the inventory is reserved.
    dQuantity Double The quantity to reserve
    istrReservationInstance String The description for the reservation
    iReservationType String The reservation type
    iStore_id Long The store with which the reservation is associated.


    -------------------------------------------------------------------------------

    action=ADJUST_RESERVE_INVENTORY,for ATP inventory systems, it calls the command AdjustInentoryReservationCmd. For non-ATP inventory systems it calls updateInventoryCmd.

    Parameters:

    Parameter Name Type Descriptions
    iReservationId String The unique reservation identifier that requires adjustment.
    iCatEntry_id Long A required parameter that specifies the catalog entry for which to reserve Inventory.
    iFulfillmentCenterId Integer The fulfillmentCenter at which the inventory is reserved.
    dQuantity Double The quantity to reserve
    iStore_id Long The store with which the reservation is associated.


    -------------------------------------------------------------------------------

    action=GET_INVENTORYCATALOG, it gets the inventory quantity from the allocatedQuantity and neededQuantity columns of ORDERITEMS table. The values in the database might use different units of measure with catalog quantity. This command converts between those two quantities. For ATP inventory systems, the QUANTITYMEASURE column of the BASEITEM table is used in the conversion. For non-ATP inventory systems, the QUANTITYMEASURE column of the INVENTORY table is used in the conversion.

    Parameters:

    Parameter Name Type Descriptions
    quantity Double The catalog quantity to convert into inventory quantity.
    orderitem OrderItemAccessBean The orderItem to convert from a catalog quantity into an inventory quantity. The quantity manager needs to get the from and to quantity units from the orderItem.

    This command calls the following TaskCommands:

    This command uses the following AccessBean:

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

        public static final int DOM_INVENTORY
        Inventory constants for DOM inventory.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DoInventoryActionCmdImpl

        public DoInventoryActionCmdImpl()
    • Method Detail

      • setRequestProperties

        public void setRequestProperties(TypedProperty aRequestProperties)
        This method sets the request properties. The request properties are used to build ATPParameter for ATP. It is not mandatory as we could also get requestProperties from command context.
        Specified by:
        setRequestProperties in interface DoInventoryActionCmd
        Parameters:
        aRequestProperties - request properties.
      • setATPParms

        public void setATPParms(ATPParameters newATPParms)
        This method sets the ATP parameters, this ATPParameters will be used to determine inventory operation needed.
        Specified by:
        setATPParms in interface DoInventoryActionCmd
        Parameters:
        newATPParms - ATPParameters
      • setAction

        public void setAction(int action)
        This method sets the action parameter, this action is used to specify the needed inventory operation. It is mandatory to specify the inventory operation that order component wants to fulfill.
        Specified by:
        setAction in interface DoInventoryActionCmd
        Parameters:
        action -
      • getAction

        public int getAction()
        This method returns the action parameters, this action is used to specify the needed inventory operation
        Specified by:
        getAction in interface DoInventoryActionCmd
        Returns:
        action
      • getCatEntryId

        public java.lang.Long getCatEntryId()
        This method returns the catalog entry unique identifier. For non-ATP, check Inventory/UpdateInventory/ReverseUpdateInventory/ResolveFulfillmentCenter will need this identifier, but it is optional if orderItems_id is set.
        Specified by:
        getCatEntryId in interface DoInventoryActionCmd
        Returns:
        catEntry_id
      • setCatEntryId

        public void setCatEntryId(java.lang.Long catEntry_id)
        This method sets the catalog entry unique identifier. For non-ATP, check Inventory/UpdateInventory/ReverseUpdateInventory/ResolveFulfillmentCenter will need this identifier, but it is optional if orderItems_id is set.
        Specified by:
        setCatEntryId in interface DoInventoryActionCmd
        Parameters:
        catEntry_id -
      • getFulfillmentCenterId

        public java.lang.Integer getFulfillmentCenterId()
        This method returns the fulfillmentCenter parameters It is used for action checkInventory,reverseInventory,resolveFulfillmentCenter,UpdateFulfillmentCenter, but it is optional if order item is set
        Specified by:
        getFulfillmentCenterId in interface DoInventoryActionCmd
        Returns:
        fulfillmentCenter_id
      • setFulfillmentCenterId

        public void setFulfillmentCenterId(java.lang.Integer fulfillmentCenter_id)
        This method sets the fulfillmentCenter parameters to check inventory. It is used for action checkInventory,reverseInventory,resolveFulfillmentCenter,UpdateFulfillmentCenter. But it is optional if orderitem is set.
        Specified by:
        setFulfillmentCenterId in interface DoInventoryActionCmd
        Parameters:
        fulfillmentCenter_id -
      • setOrderItem

        public void setOrderItem(OrderItemAccessBean newOrderItem)
        This method sets orderItem, if this inventory operation is only operated on this orderItem. For action checkInventory,reserveUpdateInventory,updateInventory,ResolveFullfillmentCenter,UpdateFulfillmentCenter,reverseInventory
        Specified by:
        setOrderItem in interface DoInventoryActionCmd
        Parameters:
        newOrderItem - The orderItem to be operated on
      • getOrderItemFulfillmentCentersMaps

        public java.util.Hashtable getOrderItemFulfillmentCentersMaps()
        This method returns lists of fulfillment centers which can ship items specified by the setOrderItems method.
        Specified by:
        getOrderItemFulfillmentCentersMaps in interface DoInventoryActionCmd
        Returns:
        orderItemFulfillmentCentersMap

          key - (Long) The OrderItem identifier, if known. Otherwise, it is a negative number.

          value - (Object[2]) Object[0] is the com.ibm.commerce.order.calculation.Item. Object[1] is a Vector of Integer fulfillment center identifiers.
      • setOrderItemFulfillmentCentersMaps

        public void setOrderItemFulfillmentCentersMaps(java.util.Hashtable orderItemFulfillmentCentersMap)
        This method sets lists of fulfillment centers which can ship items specified by the setOrderItems method. This parameter is optional for action resolveFulfillmentCenter/UpdateFulfillmentCenter
        Specified by:
        setOrderItemFulfillmentCentersMaps in interface DoInventoryActionCmd
        Parameters:
        orderItemFulfillmentCentersMap -

          key - (Long) The OrderItem identifier, if known. Otherwise, it is a negative number.

          value - (Object[2]) Object[0] is the com.ibm.commerce.order.calculation.Item. Object[1] is a Vector of Integer fulfillment center identifiers.
      • getPreferredFulfillmentCenterId

        public java.lang.Integer getPreferredFulfillmentCenterId()
        This method returns the preferred fulfillment center,it is optional for usage ResolveFulfillmentCenter and GetEstimateAvailableTime
        Specified by:
        getPreferredFulfillmentCenterId in interface DoInventoryActionCmd
        Returns:
        newPreferredFulfillmentCenterId the identifier of the preferred fulfillment center.
      • setPreferredFulfillmentCenterId

        public void setPreferredFulfillmentCenterId(java.lang.Integer preferredFulfillmentCenterId)
        This method sets the preferred fulfillment center.
        Specified by:
        setPreferredFulfillmentCenterId in interface DoInventoryActionCmd
        Parameters:
        preferredFulfillmentCenterId - the identifier of the preferred fulfillment center.
      • getShippingModeId

        public java.lang.Integer getShippingModeId()
        This method returns the shipping mode id. This parameter is optional for the action to resolve fulfillmentCenter for non-ATP.
        Specified by:
        getShippingModeId in interface DoInventoryActionCmd
        Returns:
        shippingModeId
      • setShippingModeId

        public void setShippingModeId(java.lang.Integer shippingModeId)
        This method sets the shipping mode id. This parameter is optional for the action to resolve fulfillmentCenter for non-ATP
        Specified by:
        setShippingModeId in interface DoInventoryActionCmd
        Parameters:
        shippingModeId - This parameter is optional for usage resolveFulfillmentCenter
      • getQuantity

        public java.lang.Double getQuantity()
        This method returns quantity to check the inventory.
        Specified by:
        getQuantity in interface DoInventoryActionCmd
        Returns:
        quantity
      • setQuantity

        public void setQuantity(java.lang.Double quantity)
        This method sets a quantity to check the inventory.
        Specified by:
        setQuantity in interface DoInventoryActionCmd
        Parameters:
        quantity - this parameter is mandatory for usage GetInventoryQuantity, optional for non-atp usage checkInventory,reverseUpdateInventory,allocateInventory,resolveFulfillmentCenter,updateFulfillmentCenter
      • getQuantityMeasure

        public java.lang.String getQuantityMeasure()
        This method returns a quantity measure to check the inventory (optional).
        Specified by:
        getQuantityMeasure in interface DoInventoryActionCmd
        Returns:
        quantityMeasure
      • setQuantityMeasure

        public void setQuantityMeasure(java.lang.String quantityMeasure)
        This method sets a quantity measure to check the inventory (optional).
        Specified by:
        setQuantityMeasure in interface DoInventoryActionCmd
        Parameters:
        quantityMeasure -
      • setStoreId

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

        public java.lang.String getReservationInstance()
        This method returns the reservation description identifying the instance.
        Specified by:
        getReservationInstance in interface DoInventoryActionCmd
        Returns:
        argReservationInstance reservation description
      • setReservationInstance

        public void setReservationInstance(java.lang.String argReservationInstance)
        This method sets the reservation description identifying the instance.
        Specified by:
        setReservationInstance in interface DoInventoryActionCmd
        Parameters:
        argReservationInstance - reservation description, it is required for reserveInventory
      • getReservationType

        public java.lang.Long getReservationType()
        This method returns the reservation type. The type or purpose of the reservation, such as an auction. The types are user defined and are in the INVRSRVTYP table.
        Specified by:
        getReservationType in interface DoInventoryActionCmd
        Returns:
        argReservationType reservation type
      • setReservationType

        public void setReservationType(java.lang.Long argReservationType)
        This method sets the reservation type. The type or purpose of the reservation, such as an auction. The types are user defined and are in the INVRSRVTYP table.
        Specified by:
        setReservationType in interface DoInventoryActionCmd
        Parameters:
        argReservationType - reservation type
      • getReserveId

        public java.lang.Long getReserveId()
        This method returns the reservation identifier created after executing this command.
        Specified by:
        getReserveId in interface DoInventoryActionCmd
        Returns:
        The new Reservation id.
      • getContinue

        public java.lang.String getContinue()
        This method returns whether to continue when there is exception thrown in ResolveFulfillmentCenter
        Specified by:
        getContinue in interface DoInventoryActionCmd
        Returns:
        strContinue
      • setContinue

        public void setContinue(java.lang.String strContinue)
        This method sets whether to continue
        Specified by:
        setContinue in interface DoInventoryActionCmd
        Parameters:
        strContinue - it is optional for usage resolveFulfillmenter for non-ATP
      • getUnitOfMeasure

        public java.lang.String getUnitOfMeasure()
        This method returns the unit of measure
        Specified by:
        getUnitOfMeasure in interface DoInventoryActionCmd
        Returns:
        unitOfMeasure
      • setUnitOfMeasure

        public void setUnitOfMeasure(java.lang.String unitOfMeasure)
        This method sets the unit of measure
        Specified by:
        setUnitOfMeasure in interface DoInventoryActionCmd
        Parameters:
        unitOfMeasure - it is
      • getCallerCommandName

        public java.lang.String getCallerCommandName()
        This method returns the callerCommandName
        Specified by:
        getCallerCommandName in interface DoInventoryActionCmd
        Returns:
        istrCallerCommandName
      • setCallerCommandName

        public void setCallerCommandName(java.lang.String cmdName)
        This method sets callerCommandName, different caller may have different inventory behavior. This parameter is optional. But some actions have different behavior, such as allocateInventory are different in orderPrepare,orderProcess. So for some actions, this parameter is required. The following are the list when this parameter is required: For action checkInventory,OrderItemDisplayCmd, OrderPrepareCmd have different behaviour on non-ATP, in OrderPrepare non-ATP need set inventoyStatus as AVL. For action allocateInventory,InventoryAllocationCheck,OrderItemMove,OrderPreProcess,OrderProcess have different behavior For action reverseInventory,OrderProcessCmd has different behavior with other command. For action resolveFulfillmentCenter, OrderCalculate has different behavior with other commands. So if callerCommandName is not set then the default behavior will follow
        Specified by:
        setCallerCommandName in interface DoInventoryActionCmd
        Parameters:
        cmdName -
      • getOrderId

        public java.lang.String[] getOrderId()
        This method returns orderId, inventory component need this orderId to get the current situation for order and order item
        Specified by:
        getOrderId in interface DoInventoryActionCmd
        Returns:
        anstrOrderIds
      • setOrderId

        public void setOrderId(java.lang.String[] orderIds)
        This method sets orderId, inventory component need this orderId to get the current situation for order and order item
        Specified by:
        setOrderId in interface DoInventoryActionCmd
        Parameters:
        orderIds - it is required for usage reverseInventory for ATP in OrderItemBase,allocateInventory for ATP for orderprepare,orderprocess
      • getItems

        public java.util.Vector getItems()
        This method returns Item to resolveFulfillmentcenter
        Specified by:
        getItems in interface DoInventoryActionCmd
        Returns:
        newItems
      • setItems

        public void setItems(java.util.Vector newItems)
        This method sets Item to check inventory
        Specified by:
        setItems in interface DoInventoryActionCmd
        Parameters:
        newItems - it is optional for resolveFulfillmentcenter/updateFulfillmentCenter
      • getNeededQuantity

        public java.lang.Integer getNeededQuantity()
        This method returns the needed quantity, it is converted from catalog quantity

        Specified by:
        getNeededQuantity in interface DoInventoryActionCmd
        Returns:
        Integer
      • setReservationId

        public void setReservationId(java.lang.Long rid)
        This method sets the reservation id for ATP enabled stores. this Id is got from the ReserveInventory command.
        Specified by:
        setReservationId in interface DoInventoryActionCmd
        Parameters:
        rid -
      • getMoveInOrders

        public java.lang.String[] getMoveInOrders()
        This method returns the output order where input order items are moved to.
        Specified by:
        getMoveInOrders in interface DoInventoryActionCmd
        Returns:
        String[]
      • setMoveInOrders

        public void setMoveInOrders(java.lang.String[] inOrders)
        This method sets a destination order for the output order items. If this parameter is not specified, it means there is no output order. And the input order items will be simply removed from the source orders specified by the setFromOrders method.
        Specified by:
        setMoveInOrders in interface DoInventoryActionCmd
        Parameters:
        inOrders - String[]
      • getMoveOutOrders

        public java.lang.String[] getMoveOutOrders()
        This method returns the output order where input order items are moved to.
        Specified by:
        getMoveOutOrders in interface DoInventoryActionCmd
        Returns:
        String[]
      • setMoveOutOrders

        public void setMoveOutOrders(java.lang.String[] iabOutOrders)
        This method sets the orders from which order items will be moved. This parameter is used to resolve order item abbreviations specified by the setFromOrderItemId method.
        Specified by:
        setMoveOutOrders in interface DoInventoryActionCmd
        Parameters:
        iabOutOrders - String[]
      • getUniqueOrderitemIdList

        public java.util.Hashtable getUniqueOrderitemIdList()
        This method returns the uniqueOrderItemIdList, this list records the touched order item during order item add/update
        Specified by:
        getUniqueOrderitemIdList in interface DoInventoryActionCmd
        Returns:
        uniqueOrderItemIdList
      • setUniqueOrderitemIdList

        public void setUniqueOrderitemIdList(java.util.Hashtable uniqueOrderItemIdList)
        This method sets the uniqueOrderItemIdList, this list records the touched order item during order item add/update
        Specified by:
        setUniqueOrderitemIdList in interface DoInventoryActionCmd
        Parameters:
        uniqueOrderItemIdList - this parameter is required for usage updateFillmentcenter
      • getFlushNeeded

        public boolean getFlushNeeded()
        This method returns whether flush needed for SP to catch the changes to DB
        Specified by:
        getFlushNeeded in interface DoInventoryActionCmd
        Returns:
        flushNeeded
      • setFlushNeeded

        public void setFlushNeeded(boolean flushNeeded)
        This method sets whether flush needed for SP to catch the changes to DB
        Specified by:
        setFlushNeeded in interface DoInventoryActionCmd
        Parameters:
        flushNeeded -
      • validateParameters

        public void validateParameters()
                                throws ECException

        Checks the required parameter to be set beforehand for this task command to execute. Make sure all the required parameters were passed in, or collected from somewhere. As different inventory operation may need different parameter, the required parameter will also be checked against specified action.


          action the inventory action which need to fulfill
        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
      • performExecute

        public void performExecute()
                            throws ECException
        This method executes the business logic of this command implementation.

          As the facade interface for inventory component, this command will check the operation set by order command. It also determines the needed operation based on the store's inventory type. Then it will forward to the corresponding task command. To customize this class if new action added, only need to override the protected method doMoreAction.



          There are 10 usages which correspond to the following methods:

            buildDefaultATPParameters().

            checkInventory().

            resolveFulfillmentCenter().

            updateFulfillmentCenter().

            allocateInventory().

            reverseInventory().

            getEstimatedAvailabilityDate().

            reserveInventory().

            adjustReserveInventory().

            getInventoryQuantity().

            updateOutOrderItemId().
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - thrown when RemoteException, CreateException, NamingException, FinderException is caught in StoreAccessBean
      • reset

        public void reset()
        This method should be called after a command has been executed to reset its state variables.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • getDefaultATPParms

        public ATPParameters getDefaultATPParms()
        This method returns the default ATP parameters,different caller command has different default inventory behavior
        Specified by:
        getDefaultATPParms in interface DoInventoryActionCmd
        Returns:
        ATPParameters
      • getCatEntryIdNotAvailinInv

        public java.util.Vector getCatEntryIdNotAvailinInv()
        This method returns the Vector with Catalog Entry IDs which are not available in the requested amount in inventory
        Specified by:
        getCatEntryIdNotAvailinInv in interface DoInventoryActionCmd
        Returns:
        Vector
      • getFulfillmentCenters

        public java.util.Vector getFulfillmentCenters()
        This method returns the Vector of FulfillmentCenter
        Specified by:
        getFulfillmentCenters in interface DoInventoryActionCmd
        Returns:
        vector
      • isATPParametersIgnorable

        public static boolean isATPParametersIgnorable(TypedProperty ahshATPParameters,
                                                       CommandContext commandContext)
                                                throws ECException
        This method returns true if the ATP parameters are ignorable. That is,

          'check' is specified and resolves to no order item, and

          other ATP parameters are either not specified or resolve to no order item.
        Parameters:
        ahshATPParameters - the ATP parameters.
        commandContext - to check whether the store in the command context is using ATP
        Returns:
        true if the ATP parameters could be ignoreable
        Throws:
        ECException
      • getInventorySystem

        public int getInventorySystem()
        Returns:
        Returns the inventorySystem.
      • setInventorySystem

        public void setInventorySystem(int ainventorySystem)
        Parameters:
        ainventorySystem - The inventorySystem to set.
      • orderExists

        public static final java.lang.Boolean orderExists(java.lang.String astrOrderId)
        Return true if the specified order is known to exist, false if it is known to not exist, or null if unknown.
        Parameters:
        nOrderId -
        Returns:
        true if the specified order is known to exist, false if it is known to not exist, or null if unknown.