com.ibm.commerce.order.calculation
Interface CalculationCodeCalculateCmd

All Superinterfaces:
BusinessPolicyCommand, CalculationCmd, ECCommand, TaskCommand
All Known Implementing Classes:
CalculationCodeCalculateCmdImpl

public interface CalculationCodeCalculateCmd
extends CalculationCmd

This command is called by ApplyCalculationUsage to calculate the result of a particular calculation code.
Given a CalculationCode and a list of OrderItems, calculates one or more MonetaryAmount results for each OrderItem. Each MonetaryAmount may be associated with a TaxCategory. The caller may optionally specify a list of TaxCategories, in which case the MonetaryAmount results are calculated only for CalculationRules of those TaxCategories.

See Also:
ApplyCalculationUsageCmd, Item

Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String defaultCommandClassName
           
static java.lang.String NAME
           
 
Method Summary
 java.math.BigDecimal[] getValues()
          Returns the result.
 java.math.BigDecimal[] getValues(java.lang.Integer anTaxCategoryId)
          Returns the result of a particular tax category.
 void setCode(CalculationCodeAccessBean aabCode)
          Sets the calculation code.
 void setItems(Item[] aItems)
          Sets the items.
 void setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds)
          Sets the tax categories.
 
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
 
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
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT

defaultCommandClassName

public static final java.lang.String defaultCommandClassName

NAME

public static final java.lang.String NAME
Method Detail

getValues

public java.math.BigDecimal[] getValues()
Returns the result.

getValues

public java.math.BigDecimal[] getValues(java.lang.Integer anTaxCategoryId)
Returns the result of a particular tax category.

setCode

public void setCode(CalculationCodeAccessBean aabCode)
Sets the calculation code.

setItems

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

setTaxCategoryIds

public void setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds)
Sets the tax categories.