com.ibm.commerce.orderitems.commands

Class AdminOrderItemUpdateCOCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, AdminOrderItemUpdateCOCmd, OrderItemAddCmd, OrderItemUpdateCmd, 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


    public class AdminOrderItemUpdateCOCmdImpl
    extends OrderItemUpdateCmdImpl
    implements AdminOrderItemUpdateCOCmd
    This is the default implementation of the AdminOrderItemUpdateCOCmd controller command. It allows an administrator to manually add or update a price and currency for the order item instead of retrieving the price from catalog entry.

    Input parameters:

    It accepts all parameters for OrderItemUpdateCmdImpl, and below,
    Name Description
    fulfillmentCenterId_i Fulfillment center Id related to the enumeration group i, Optional
    price_i Price related to the enumeration group i, Optional
    currency_i Currency related to the enumeration group i, Optional, but if price_i is passed, it's mandatory
    overrideReasonCode_i Price override reason code to the enumeration group i, Optional
    remark_i Remark to the enumeration group i, Optional
    forUserId The for User Id, the owner Id of the order, Mandatory
    contractId The contract Id, the owner Id of the order, Optional

    Output parameters:

    Same as OrderItemUpdateCmdImpl

    Behaviour:

    This command is called by an administrator to manually add or update a price and currency for the order item. It is used instead of retrieving the price from catalog entry. Or override the fulfillment center for the order items. It extends the OrderItemUpdateCmdImpl and overrides the updateOrderItem and updatePrice of the super class. It support the price override reason code, and remark. OrderItemsCmdHelper.validatePrice(Integer, CommandContext, String, Long, Long, String) will be called to check if the new price is valid. The order will be blocked if the price override is not valid. Also business audit is supported for this price override.
    See Also:
    OrderItemBaseCmdImpl, Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The IBM copyright notice field.
        See Also:
        Constant Field Values
      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        The full name of this class.
    • Constructor Detail

      • AdminOrderItemUpdateCOCmdImpl

        public AdminOrderItemUpdateCOCmdImpl()
    • Method Detail

      • getTheUserId

        public java.lang.Long getTheUserId()
        This method returns user id.
        Overrides:
        getTheUserId in class OrderItemBaseCmdImpl
        Returns:
        user id. if the parameter forUserId is set, return it. Otherwise return the user id in the session.
      • reset

        public void reset()
        This method resets the instance variables.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class OrderItemBaseCmdImpl
      • setCurrency

        public void setCurrency(java.util.Hashtable ahshCurrency)
        This method sets the currency.
        Specified by:
        setCurrency in interface AdminOrderItemUpdateCOCmd
        Parameters:
        ahshCurrency - a hashtable of currency.
      • setPrice

        public void setPrice(java.util.Hashtable ahshPrice)
        This method sets the price.
        Specified by:
        setPrice in interface AdminOrderItemUpdateCOCmd
        Parameters:
        ahshPrice - a hashtable of price
      • setNewTradingId

        public void setNewTradingId(java.lang.Long anTradingId)
        This method sets the trading id to be stored in OrderItem.
        Parameters:
        anTradingId - the trading id to be stored in OrderItem.
      • getNewTradingId

        public java.lang.Long getNewTradingId()
        This method gets the trading id to be stored in OrderItem.
        Returns:
        inTradingId, the trading id to be stored in OrderItem.