com.ibm.commerce.order.calculation
Interface CalculationRuleCalculateCmd

All Superinterfaces:
BusinessPolicyCommand, CalculationCmd, TaskCommand
All Known Implementing Classes:
CalculationRuleCalculateCmdImpl

public interface CalculationRuleCalculateCmd
extends CalculationCmd

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
The IBM copyright field notice.
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
The name of this command.
See Also:
Constant Field Values

defaultCommandClassName

public static final java.lang.String defaultCommandClassName
The default implementation of this command.
See Also:
Constant Field Values
Method Detail

getValues

public java.math.BigDecimal[] getValues()
Returns the values corresponding to the items.
Returns:
the values.

setItems

public void setItems(Item[] aItems)
Sets the items.
Parameters:
aItems - the items.

setRule

public void setRule(CalculationRuleAccessBean aabRule)
Sets the calculation rule.
Parameters:
aabRule - the calculation rule.