java.lang.Object | +--CacheableCommandImpl | +--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.CalculationRuleCombineCmdImpl
The default implementation of
CalculationRuleCombineCmd
.
Its behaviour is as follows:
CalculationRuleQualifyCmd
) to determine the list of qualified
items.CalculationRuleQualifyCmd
) to calculate its values for the
list of qualified items.Commands used:
Access beans used:OrderItemAccessBean
StoreEntityCalculationUsageAccessBean
CalculationMethodAccessBean
CalculationCodeAccessBean
CalculationRuleAccessBean
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT |
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. CalculationRuleCombineCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CalculationRuleCombineCmdImpl() |
Method Summary | |
---|---|
protected
java.math.BigDecimal[] |
callRuleCalculate(CalculationRuleAccessBean aabRule,
Item[] aItems) This method is called by performExecute() to invoke the CalculationRuleCalculate command. |
protected
Item[] |
callRuleQualify(CalculationRuleAccessBean aabRule,
Item[] aItems) This method is called by performExecute() to invoke the CalculationRuleQualify command. |
protected
void |
combineRules() This method is called by performExecute() to combine calculation rules based on their combination values. |
protected
CalculationCodeAccessBean |
getCode() |
protected
Item[] |
getItems() |
CalculationRuleAccessBean[] |
getRules() getRules method comment. |
protected
java.lang.Integer[] |
getTaxCategoryIds() Returns the tax categories. |
java.math.BigDecimal[] |
getValues(java.lang.Integer anRuleId) getValues method comment. |
protected
boolean |
isRestricted(CalculationRuleAccessBean aabRule) |
void |
performExecute() The business logic for this command. |
protected
void |
removeValues(java.lang.Integer anRuleId) This method is called by combineRules() to remove a calculation rule and its result. |
void |
reset() This method should be called after a command has been executed to reset its states variables. |
void |
setCode(CalculationCodeAccessBean aabCode) Sets the calculation code. |
void |
setItems(
Item[] aItems) Sets the items. |
protected
void |
setRules(CalculationRuleAccessBean[] aabRules) Sets the calculation rules. |
void |
setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds) Sets the tax categories that should be active during execution. |
protected
void |
setValues(java.lang.Integer anRuleId,
java.math.BigDecimal[] adValues) Sets the result of a particular calculation rule. |
Methods inherited from class com.ibm.commerce.order.calculation. CalculationCmdImpl |
createCommand,
getCurrency,
getCustomProperties,
getCustomProperty,
getTimestamp,
getUsageId,
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 CalculationRuleCombineCmdImpl()
Method Detail |
---|
protected java.math.BigDecimal[] callRuleCalculate(CalculationRuleAccessBean aabRule, Item[] aItems) throws ECException
protected Item[] callRuleQualify(CalculationRuleAccessBean aabRule, Item[] aItems) throws ECException
protected void combineRules() throws ECException
public CalculationRuleAccessBean[] getRules()
getRules
in interface
CalculationRuleCombineCmd
protected java.lang.Integer[] getTaxCategoryIds()
public java.math.BigDecimal[] getValues(java.lang.Integer anRuleId)
getValues
in interface
CalculationRuleCombineCmd
anRuleId
- the calculation rule ID.protected boolean isRestricted(CalculationRuleAccessBean aabRule) throws ECException
public void performExecute() throws ECException
AbstractECTargetableCommand
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
protected void removeValues(java.lang.Integer anRuleId)
public void reset()
AbstractECTargetableCommand
reset
in class
CalculationCmdImpl
com.ibm.websphere.command.Command#reset()
public void setCode(CalculationCodeAccessBean aabCode)
CalculationRuleCombineCmd
setCode
in interface
CalculationRuleCombineCmd
aabCode
- the calculation code.protected CalculationCodeAccessBean getCode()
public void setItems(Item[] aItems)
CalculationRuleCombineCmd
setItems
in interface
CalculationRuleCombineCmd
aItems
- the items.protected Item[] getItems()
protected void setRules(CalculationRuleAccessBean[] aabRules)
public void setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds)
CalculationRuleCombineCmd
setTaxCategoryIds
in interface
CalculationRuleCombineCmd
anTaxCategoryIds
- the tax category IDs.protected void setValues(java.lang.Integer anRuleId, java.math.BigDecimal[] adValues)