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.
 
Fields inherited from interface com.ibm.commerce.taxation.commands.ApplyOrderTaxesCmd
NAME
 
Constructor Summary
ApplyOrderTaxesTIKCmdImpl()
           
 
Method Summary
protected  void callTaxTIFLoop()
          Loop through the orderItemABArray and add each item to a TaxwareOrder object.
protected  com.ibm.commerce.isv.kit.tax.CalculationCmd createCommand(java.lang.Integer calculationMethodId)
           
protected  java.lang.String getOrderCurrency()
           
protected  OrderItemAccessBean[] getOrderItems()
           
 void init()
           
 void performExecute()
           
protected  void postApplyCalculationUsages()
          Check for each order items if the tax amounts have been successfully calculated.
protected  void postCalculationCodeApply(java.util.Hashtable orderItemABHash)
           
protected  void setCalculationUsages(java.lang.Integer[] calculationUsages)
           
 void setOrderCurrency(java.lang.String orderCurrency)
           
 void setOrderItems(java.util.Enumeration orderItems)
           
 void setOrderItems(OrderItemAccessBean[] orderItems)
           
protected  void setOrderItemsI(OrderItemAccessBean[] orderItems)
           
 void setTaxCategoryIds(java.lang.Integer[] taxCategoryIds)
           
 void validateParameters()
           
 

Field Detail

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.

Constructor Detail

ApplyOrderTaxesTIKCmdImpl

public ApplyOrderTaxesTIKCmdImpl()
Method Detail

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