com.ibm.commerce.isv.kit.tax
Class ApplyCalculationUsageTIKCmdImpl
java.lang.Object
|
+--com.ibm.commerce.command.AbstractECCommand
|
+--com.ibm.commerce.command.TaskCommandImpl
|
+--com.ibm.commerce.command.BusinessPolicyCommandImpl
|
+--com.ibm.commerce.order.calculation.CalculationCmdImpl
|
+--com.ibm.commerce.order.calculation.ApplyCalculationUsageCmdImpl
|
+--com.ibm.commerce.isv.kit.tax.ApplyCalculationUsageTIKCmdImpl
- All Implemented Interfaces:
- ApplyCalculationUsageCmd, ApplyCalculationUsageTIKCmd, BusinessPolicyCommand, CalculationCmd, ECCommand, TaskCommand
- public class ApplyCalculationUsageTIKCmdImpl
- extends ApplyCalculationUsageCmdImpl
- implements ApplyCalculationUsageTIKCmd
The ApplyCalculationUsageTIKCmd
Task Command Implementation is called
by the OrderPrepareCmd
Controller Command to set the different tax
amounts (e.g. GST, PST etc.) for each OrderItem supplied by OrderPrepare.
Given a set of OrderItems
in a particular Order this command invokes
the CalculationCodeCombineCmd task command to determine which CalculationCodes
should be applied to which OrderItems.
CalculationCodeCombineCmd returns a list of elements
where each
element is a CalculationCode and a list of OrderItems to which the CalculationCode
is applicable.
- See Also:
Item
,
With the list of OrderItems and the CalculationCodes, ApplyCalculationUsageTIKCmd
uses the TaxOrderCmd and TaxOrderItemCmd interfaces provided in the
Tax Integration Interface to invoke a tax calculation module to calculate the
tax amounts for each of the OrderItems.
If the command is successful, it will set the tax amounts in ORDERITEMS.
Methods inherited from class com.ibm.commerce.order.calculation.ApplyCalculationUsageCmdImpl |
callCodeApply, callCodeCalculate, callCodeCombine, checkAppliedItems, getAppliedItems, getItems, getTaxCategoryIds, reset, setItems, setTaxCategoryIds, updateAppliedItems |
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.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, 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.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
BIG_DECIMAL_ZERO
public static final java.math.BigDecimal BIG_DECIMAL_ZERO
DOUBLE_ZERO
public static final java.lang.Double DOUBLE_ZERO
ApplyCalculationUsageTIKCmdImpl
public ApplyCalculationUsageTIKCmdImpl()
addTaxAmounts
protected void addTaxAmounts(Item aItem,
TaxOrderItemCmd taxOrderItemCmd)
- Update an item with the tax amounts for each given taxing authority or jurisdiction returned
from the tax calculation module.
addTaxTotal
protected void addTaxTotal(Item aItem,
TaxOrderItemCmd taxOrderItemCmd)
throws ECException
- Add to the tax total of a particular item.
callTaxApply
protected void callTaxApply(Item[] aItems,
TaxOrderCmd taxOrderCmd)
throws ECException
- Loop through the orderitems and update each item with the tax amounts returned
from the tax calculation module.
callTaxTIFLoop
protected void callTaxTIFLoop()
throws ECException
- Loop through the orderItems and add each item to a TaxOrderItem object.
Call the applicable tax calculation module to calculate the taxes -
and post the results back.
getFulfillmentCenterAddress
protected StoreAddressAccessBean getFulfillmentCenterAddress(CommandContext commandContext,
java.lang.Integer FulfillmentCenterId)
throws ECException
- Retrieve the fulfillment center address access bean.
getStoreAddress
protected StoreAddressAccessBean getStoreAddress(CommandContext commandContext)
throws ECException
- Retrieve the store physical location address access bean.
performExecute
public void performExecute()
throws ECException
- Executes main business logic of the command.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class ApplyCalculationUsageCmdImpl
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.