com.ibm.commerce.price.commands
Class ApplyOrderAdjustmentsCmdImpl

com.ibm.commerce.price.commands.ApplyOrderAdjustmentsCmdImpl
All Implemented Interfaces:
ApplyOrderAdjustmentsCmd, ECCommand, TaskCommand

public class ApplyOrderAdjustmentsCmdImpl
implements ApplyOrderAdjustmentsCmd

Apply order adjustments against an order. First all existing order adjustments (with a calculation usage of Discount) are deleted. Then all calculation codes with a calculation usage of Discount are used to create new order adjustments. However, no orderItem adjustments for "priceOverride" orderItems are created.


Fields inherited from interface com.ibm.commerce.price.commands.ApplyOrderAdjustmentsCmd
COPYRIGHT, NAME
 
Fields inherited from interface com.ibm.commerce.command.ECCommand
defaultCommandClassName
 
Constructor Summary
ApplyOrderAdjustmentsCmdImpl()
          ApplyOrderAdjustmentsCmdImpl constructor.
 
Method Summary
protected  void init()
          init method comment.
 void setOrderItems(OrderItemAccessBean[] orderItems)
          Set the order items to process for discounts.
 
Methods inherited from interface com.ibm.commerce.price.commands.ApplyOrderAdjustmentsCmd
setOrderCurrency, setOrderItems
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 

Constructor Detail

ApplyOrderAdjustmentsCmdImpl

public ApplyOrderAdjustmentsCmdImpl()
ApplyOrderAdjustmentsCmdImpl constructor.
Method Detail

init

protected void init()
             throws ECException
init method comment.

setOrderItems

public void setOrderItems(OrderItemAccessBean[] orderItems)
                   throws ECSystemException
Set the order items to process for discounts. Only order items that have not been overridden are processed for discounts. An order item with the priceOverride flag set is ignored. All order items also have their total adjustment field set to zero regardless of the state of the priceOverride flag.
Specified by:
setOrderItems in interface ApplyOrderAdjustmentsCmd
Parameters:
orderItems - an array of order item access beans.