java.lang.ObjectCacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.TaskCommandImpl
com.ibm.commerce.command.BusinessPolicyCommandImpl
com.ibm.commerce.order.calculation.CalculationCmdImpl
com.ibm.commerce.order.calculation.CalculationRuleCalculateCmdImpl
The default implementation of CalculationRuleCalculateCmd.
Its behaviour is as follows:
Commands used:
Access beans used:Field Summary | |
static java.lang.String | COPYRIGHT The IBM copyright notice field. |
Fields inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl |
policyId, requestProperties |
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.order.calculation.CalculationRuleCalculateCmd |
defaultCommandClassName, NAME |
Fields inherited from interface com.ibm.commerce.command.ECCommand |
defaultCommandClassName |
Constructor Summary | |
CalculationRuleCalculateCmdImpl() Constructor for CalculationRuleCalculateCmdImpl. |
Method Summary | |
protected void | applyOrderItemLevelParameters(java.math.BigDecimal[] adValues, DirectAttachmentHelper aDirectAttachmentHelper) Applies the parametrized orderitem level direct attachments (see ORDICALCD) associated with the calculation rule to a list of values. |
protected void | applyOrderLevelParameters(java.math.BigDecimal[] adValues, java.math.BigDecimal[] adWeights, DirectAttachmentHelper aDirectAttachmentHelper, java.lang.Long anOrderId) Applies the parametrized order level direct attachments (see ORDCALCD) associated with the calculation rule to a list of values. |
protected void | applyParameters(java.math.BigDecimal[] adValues, java.math.BigDecimal[] adWeights) Applies the parametrized direct attachments associated with the calculation rule to a list of values. |
protected java.math.BigDecimal | callRange(CalculationRangeAccessBean aabRange, CalculationRangeLookupResultAccessBean aabLookupResult, java.math.BigDecimal adApplicableLookupNumber, java.math.BigDecimal adApplicableBaseMonetaryValue) Invokes the calculation method of type "CalculationRange" referenced by the calculation range (see CALRANGE.CALMETHOD_ID, CalculationRangeCmd) to calculate the resulting value. |
protected CalculationScaleLookupCmd | callScaleLookup(CalculationScaleAccessBean aabScale) Invokes the calculation method of type "CalculationScaleLookup" referenced by the calculation scale (see CALSCALE.CALMETHOD_ID, CalculationScaleLookupCmd) to determine a lookup number, a base monetary value, a result multiplier and a list of mathematical weights. |
protected void | compareValues() Merges the resulting lists of values of the calculation scales by currency and selects the merged list with the lowest total value. |
protected Item[] | getItems() Returns the items. |
protected CalculationRuleAccessBean | getRule() Returns the calculation rule. |
protected java.util.Set | getScaleCurrencies(CalculationScaleAccessBean[] aabScales) Retrieves the set of currencies referenced by a list of calculation scales. |
java.math.BigDecimal[] | getValues() Returns the values corresponding to the items. |
protected java.math.BigDecimal[] | getValues(java.lang.String astrCurrency) Returns the merged list of values of a currency. |
void | performExecute() The business logic for this command. |
void | reset() Resets the command properties. |
protected java.math.BigDecimal[] | scaleCalculate(CalculationScaleAccessBean aabScale) Calculates the resulting list of values of a calculation scale. |
void | setItems(Item[] aItems) Sets the items. |
void | setRule(CalculationRuleAccessBean aabRule) Sets the calculation rule. |
protected void | setValues(java.math.BigDecimal[] adValues) Sets the values. |
protected void | setValues(java.lang.String astrCurrency, java.math.BigDecimal[] adValues) Sets the merged list of values of a currency. |
Methods inherited from class com.ibm.commerce.order.calculation.CalculationCmdImpl |
createCommand, getCurrency, getCustomProperties, getCustomProperty, getTimestamp, getUsageId, recycleCommand, setCurrency, setCustomProperties, setCustomProperty, setTimestamp, setUsageId |
Methods inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl |
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Constructor Detail |
public CalculationRuleCalculateCmdImpl()
Method Detail |
public void reset()
protected void applyOrderItemLevelParameters(java.math.BigDecimal[] adValues, DirectAttachmentHelper aDirectAttachmentHelper) throws ECException
protected void applyOrderLevelParameters(java.math.BigDecimal[] adValues, java.math.BigDecimal[] adWeights, DirectAttachmentHelper aDirectAttachmentHelper, java.lang.Long anOrderId) throws ECException
protected void applyParameters(java.math.BigDecimal[] adValues, java.math.BigDecimal[] adWeights) throws ECException
protected java.math.BigDecimal callRange(CalculationRangeAccessBean aabRange, CalculationRangeLookupResultAccessBean aabLookupResult, java.math.BigDecimal adApplicableLookupNumber, java.math.BigDecimal adApplicableBaseMonetaryValue) throws ECException
protected CalculationScaleLookupCmd callScaleLookup(CalculationScaleAccessBean aabScale) throws ECException
protected void compareValues() throws ECException
protected Item[] getItems()
protected CalculationRuleAccessBean getRule()
protected java.util.Set getScaleCurrencies(CalculationScaleAccessBean[] aabScales) throws ECException
public java.math.BigDecimal[] getValues()
protected java.math.BigDecimal[] getValues(java.lang.String astrCurrency)
public void performExecute() throws ECException
protected java.math.BigDecimal[] scaleCalculate(CalculationScaleAccessBean aabScale) throws ECException
public void setItems(Item[] aItems)
public void setRule(CalculationRuleAccessBean aabRule)
protected void setValues(java.math.BigDecimal[] adValues)
protected void setValues(java.lang.String astrCurrency, java.math.BigDecimal[] adValues)
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.