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.CalculationCodeCalculateCmdImpl
The default implementation of
CalculationCodeCalculateCmd
.
Its behaviour is as follows:
CalculationRuleCombineCmd
) to determine the following:
CalculationHelper.round(BigDecimal[], String, CommandContext)
)
for each tax category*.Commands used:
Access beans used:OrderItemAccessBean
CalculationMethodAccessBean
CalculationCodeAccessBean
CalculationRuleAccessBean
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. CalculationCodeCalculateCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CalculationCodeCalculateCmdImpl() Constructor for CalculationCodeCalculateCmdImpl. |
Method Summary | |
---|---|
protected
CalculationRuleCombineCmd |
callRuleCombine() Invokes the calculation method of type "CalculationRuleCombine" referenced by the current store (see STENCALUSG.ACTRC_CALMETHOD_ID, CalculationRuleCombineCmd ). |
protected
Item[] |
getItems() Returns the items. |
protected
java.lang.Integer[] |
getTaxCategoryIds() Returns the tax categories. |
java.math.BigDecimal[] |
getValues() Returns the values corresponding to the items. |
java.math.BigDecimal[] |
getValues(java.lang.Integer anTaxCategoryId) Returns the values for a tax category. |
void |
performExecute() The business logic for this command. |
void |
reset() This method should be called after a command has been executed to reset its states variables. |
protected
void |
roundValues() Rounds the merged list of values by "fudging" for each 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 that should be active during execution. |
protected
void |
setValues(java.math.BigDecimal[] adValues) Sets the values corresponding to the items. |
protected
void |
setValues(java.lang.Integer anTaxCategoryId,
java.math.BigDecimal[] adValues) Sets the values for a tax category. |
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 CalculationCodeCalculateCmdImpl()
Method Detail |
---|
protected CalculationRuleCombineCmd callRuleCombine() throws ECException
CalculationRuleCombineCmd
). This method is called by
performExecute()
.
ECException
protected Item[] getItems()
protected java.lang.Integer[] getTaxCategoryIds()
public java.math.BigDecimal[] getValues()
getValues
in interface
CalculationCodeCalculateCmd
public java.math.BigDecimal[] getValues(java.lang.Integer anTaxCategoryId)
getValues
in interface
CalculationCodeCalculateCmd
anTaxCategoryId
- the tax category ID.public void performExecute() throws ECException
AbstractECTargetableCommand
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
ECCommand.performExecute()
public void reset()
AbstractECTargetableCommand
reset
in class
CalculationCmdImpl
com.ibm.websphere.command.Command#reset()
protected void roundValues() throws ECException
CalculationHelper.round(BigDecimal[], String, CommandContext)
.
ECException
public void setCode(CalculationCodeAccessBean aabCode)
setCode
in interface
CalculationCodeCalculateCmd
aabCode
- the calculation code.public void setItems(Item[] aItems)
setItems
in interface
CalculationCodeCalculateCmd
aItems
- the items.public void setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds)
setTaxCategoryIds
in interface
CalculationCodeCalculateCmd
anTaxCategoryIds
- the tax category IDs.protected void setValues(java.math.BigDecimal[] adValues)
adValues
- the values.protected void setValues(java.lang.Integer anTaxCategoryId, java.math.BigDecimal[] adValues)
anTaxCategoryId
- the tax category ID.adValues
- the values.