Given a calculation rule and a list of items, this command will calculate the value of the calculation rule for each item.
For more information, refer to the default implementation of this command, CalculationRuleCalculateCmdImpl.
This is also the base interface that commands registered as calculation methods of type "CalculationRuleCalculate" must extend.
This command is registered as the following bootstrap calculation methods:
Calculation Method ID | Calculation Usage ID | Name |
---|---|---|
-7 | -1 | CalculationRuleCalculate (discount) |
-27 | -2 | CalculationRuleCalculate (shipping) |
-47 | -3 | CalculationRuleCalculate (sales tax) |
-67 | -4 | CalculationRuleCalculate (shipping tax) |
-5007 | -5 | CalculationRuleCalculate (coupon) |
Field Summary | |
static java.lang.String | COPYRIGHT The IBM copyright field notice. |
static java.lang.String | defaultCommandClassName The default implementation of this command. |
static java.lang.String | NAME The name of this command. |
Method Summary | |
java.math.BigDecimal[] | getValues() Returns the values corresponding to the items. |
void | setItems(Item[] aItems) Sets the items. |
void | setRule(CalculationRuleAccessBean aabRule) Sets the calculation rule. |
Methods inherited from interface com.ibm.commerce.order.calculation.CalculationCmd |
getCurrency, getCustomProperties, getCustomProperty, getTimestamp, getUsageId, setCurrency, setCustomProperties, setCustomProperty, setTimestamp, setUsageId |
Methods inherited from interface com.ibm.commerce.command.BusinessPolicyCommand |
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties |
Field Detail |
public static final java.lang.String COPYRIGHT
public static final java.lang.String NAME
public static final java.lang.String defaultCommandClassName
Method Detail |
public java.math.BigDecimal[] getValues()
public void setItems(Item[] aItems)
public void setRule(CalculationRuleAccessBean aabRule)
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.