com.ibm.commerce.orderitems.commands

Class OrderItemDeleteCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderItemDeleteCmd, Protectable, 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
    Direct Known Subclasses:
    QuoteItemDeleteCmdImpl


    public class OrderItemDeleteCmdImpl
    extends OrderBaseCmdImpl
    implements OrderItemDeleteCmd
    This is the default implementation of the OrderItemDeleteCmd controller command.

    Input parameters:

    Name Description
    orderItemId The orderitem Ids, the order items to be deleted. Mandatory if catEntryId is not specified.
    catEntryId The catalog entry Ids, to which the order items to be deleted. Mandatory if orderItemId is not specified.
    orderId The order Ids. Mandatory if orderItemId is not specified.
    outOrderName The names of name-value pairs to add to the redirection URL. The values of the added name-value pairs are the reference numbers of the input orders. Optional.
    calculateOrder If order will be recalculated after some order items are removed. The values can be 1 for recalculate or 0 for not recalculate. Default value is 0

    Output parameters:

    Name Description
    The value for outOrderName[i] The array of order Ids.
    orderId If outOrderName is empty, used as outOrderName.

    Behaviour:

    • For each of the order items to be deleted, the command does the following if orderItemId is specified:
      • Obtains the order that the order item is associated with.
      • If the order is in pending state, unlocks it and updates the timestamp.
      • Deletes the order items.
    • The command does the following if catEntryId is specified:
      • Compiles the list of orders for processing.
        The ResolveOrdersCmd task command is invoked to obtain the current pending orders, if needed.
      • Does the following for each order in the list:
        • If the order is in pending state and the order items for the order contain the specified product, unlocks the order and updates the timestamp.
        • Deletes all the order items that contain the specified product.
    • The command will call OrderCalculateCmd to calculate the whole if the passed parameter calculateOrder=1 for calculation usage CalculationConstants.USAGE_DISCOUNT

    View Task: RedirectView

    This command uses the following AccessBeans:
    See Also:
    OrderCalculateCmd, ResolveOrdersCmd, Serialized Form