com.ibm.commerce.order.calculation

Interface CalculationRuleCombineCmd

  • All Superinterfaces:
    BusinessPolicyCommand, com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, CalculationCmd, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Subinterfaces:
    VATCalculationRuleCombineCmd
    All Known Implementing Classes:
    CalculationRuleCombineCmdImpl, VATCalculationRuleCombineCmdImpl


    public interface CalculationRuleCombineCmd
    extends CalculationCmd

    Sets a calculation code and a list of items first. This command will determine the calculation rules that are applicable to the items and calculate the values of these calculation rules.

    For sales/shipping tax only, the caller has to specify the tax categories that should be active during execution. Normally that would be all sales/shipping tax categories defined in the current store. This command will ignore calculation rules that don't belong to these tax categories.

    For more information, refer to the default implementation of this command, CalculationRuleCombineCmdImpl.

    This is also the base interface that commands registered as calculation methods of type "CalculationRuleCombine" must extend.

    This command is registered as the following bootstrap calculation methods:

    Calculation Method IDCalculation Usage IDName
    -5-1CalculationRuleCombine (discount)
    -25-2CalculationRuleCombine (shipping)
    -45-3CalculationRuleCombine (sales tax)
    -65-4CalculationRuleCombine (shipping tax)
    -5005-5CalculationRuleCombine (coupon)

    • Field Detail

      • COPYRIGHT

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

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

      • getRules

        CalculationRuleAccessBean[] getRules()
        Returns the applicable calculation rules.
        Returns:
        the applicable calculation rules.
      • getValues

        java.math.BigDecimal[] getValues(java.lang.Integer anRuleId)
        Returns the values of a calculation rule corresponding to the items.
        Parameters:
        anRuleId - the calculation rule ID.
        Returns:
        the values of the calculation rules corresponding to the items.
      • setCode

        void setCode(CalculationCodeAccessBean aabCode)
        Sets the calculation code.
        Parameters:
        aabCode - the calculation code.
      • setItems

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

        void setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds)
        Sets the tax categories that should be active during execution. Normally that would be all sales/shipping tax categories defined in the current store. For sales/shipping tax only.
        Parameters:
        anTaxCategoryIds - the tax category IDs.