com.ibm.commerce.isv.kit.tax
Class ApplyOrderTaxesTIKCmdImpl
com.ibm.commerce.isv.kit.tax.ApplyOrderTaxesTIKCmdImpl
- All Implemented Interfaces:
- ApplyOrderTaxesCmd
- public class ApplyOrderTaxesTIKCmdImpl
- implements ApplyOrderTaxesCmd
Field Summary |
static java.lang.String |
COPYRIGHT
The ApplyOrderTaxesTIKCmd Task Command Implementation is called
by the OrderPrepareCmd Controller Command to set the different tax
amounts (e.g. |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- The
ApplyOrderTaxesTIKCmd
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.
It uses the TaxOrderCmd and TaxOrderItemCmd interfaces to calculate the
different tax amounts for each of the OrderItems.
If the command is successful, it will set the tax amounts in ORDERITEMS.
If unsuccessful, the command throws the ECApplicationException
specifying an Error Code of ERRCODE_NO_TAX and the Error View named CALCODE_ERRVIEW.
ApplyOrderTaxesTIKCmdImpl
public ApplyOrderTaxesTIKCmdImpl()
callTaxTIFLoop
protected void callTaxTIFLoop()
throws ECException
- Loop through the orderItemABArray and add each item to a TaxwareOrder object.
Call Taxware to calculate the taxes - and post the results back.
createCommand
protected com.ibm.commerce.isv.kit.tax.CalculationCmd createCommand(java.lang.Integer calculationMethodId)
throws javax.ejb.CreateException,
javax.ejb.FinderException,
javax.naming.NamingException,
java.rmi.RemoteException,
ECException
getOrderCurrency
protected java.lang.String getOrderCurrency()
getOrderItems
protected OrderItemAccessBean[] getOrderItems()
init
public void init()
throws ECException
performExecute
public void performExecute()
throws ECException
postApplyCalculationUsages
protected void postApplyCalculationUsages()
throws ECException
- Check for each order items if the tax amounts have been successfully
calculated.
postCalculationCodeApply
protected void postCalculationCodeApply(java.util.Hashtable orderItemABHash)
throws ECException
setCalculationUsages
protected void setCalculationUsages(java.lang.Integer[] calculationUsages)
setOrderCurrency
public void setOrderCurrency(java.lang.String orderCurrency)
setOrderItems
public void setOrderItems(java.util.Enumeration orderItems)
throws ECSystemException
setOrderItems
public void setOrderItems(OrderItemAccessBean[] orderItems)
throws ECSystemException
setOrderItemsI
protected void setOrderItemsI(OrderItemAccessBean[] orderItems)
setTaxCategoryIds
public void setTaxCategoryIds(java.lang.Integer[] taxCategoryIds)
validateParameters
public void validateParameters()
throws ECException