com.ibm.commerce.taxation.commands
Class ApplyOrderTaxesCmdImpl

java.lang.Object
  ApplyCalculationUsagesCmdImpl
      com.ibm.commerce.taxation.commands.ApplyOrderTaxesCmdImpl
All Implemented Interfaces:
ApplyOrderTaxesCmd

public class ApplyOrderTaxesCmdImpl
extends ApplyCalculationUsagesCmdImpl
implements ApplyOrderTaxesCmd

The ApplyOrderTaxesCmd Task Command default 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 CalculationCodes with calculationUsage of Taxation to calculate the different tax amounts for each of the OrderItems.

If the command is successful, it will invoke another Task Command to 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.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
Fields inherited from interface com.ibm.commerce.taxation.commands.ApplyOrderTaxesCmd
NAME
Constructor Summary
ApplyOrderTaxesCmdImpl()
Method Summary
void init()
This method sets up the system for taxation : Tax Types for Calculation Usages. Tax Categories for each of the Tax Types.
protected void postApplyCalculationUsages(java.lang.Integer usageType)
Check if the command is unsuccessful.
protected void postCalculationCodeApply(java.util.Hashtable orderItemABHash, java.lang.Integer usageType)
Check for each orderitems if the tax amounts have been successfully calculated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

ApplyOrderTaxesCmdImpl

public ApplyOrderTaxesCmdImpl()
Method Detail

init

public void init()
          throws ECException
This method sets up the system for taxation :
Throws:
ECException

postApplyCalculationUsages

protected void postApplyCalculationUsages(java.lang.Integer usageType)
                                   throws ECException
Check if the command is unsuccessful. If it is, the command throws the ECApplicationException specifying an Error Code of ERRCODE_NO_TAX and the Error View named CALCODE_ERRVIEW.
Throws:
ECException

postCalculationCodeApply

protected void postCalculationCodeApply(java.util.Hashtable orderItemABHash,
                                        java.lang.Integer usageType)
Check for each orderitems if the tax amounts have been successfully calculated.

Feedback