com.ibm.commerce.isv.kit.tax
Class ApplyOrderTaxesTIKCmdImpl
java.lang.Object
|
+--CacheableCommandImpl
|
+--com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.TaskCommandImpl
|
+--com.ibm.commerce.isv.kit.tax.ApplyOrderTaxesTIKCmdImpl
- All Implemented Interfaces:
-
ApplyOrderTaxesCmd,
ECCommand,
ECTargetableCommand,
TaskCommand
- public class ApplyOrderTaxesTIKCmdImpl
- extends
TaskCommandImpl
- implements
ApplyOrderTaxesCmd
- See Also:
- Serialized
Form
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. |
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,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
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.
- See Also:
-
Constant Field Values
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.
-
-
ECException
createCommand
protected CalculationCmd createCommand(java.lang.Integer calculationMethodId)
throws CreateException,
FinderException,
javax.naming.NamingException,
java.rmi.RemoteException,
ECException
-
CreateException
FinderException
javax.naming.NamingException
java.rmi.RemoteException
-
ECException
getOrderCurrency
protected java.lang.String getOrderCurrency()
getOrderItems
protected OrderItemAccessBean[] getOrderItems()
init
public void init()
throws ECException
-
-
ECException
public void performExecute()
throws ECException
- Description copied from class:
AbstractECTargetableCommand
- The business logic for this command. This method should be overwritten by
all command writers. Command writers should call super.performExecute() as the
first line in their method.
-
- Specified by:
-
performExecute
in interface
ECCommand
- Overrides:
-
performExecute
in class
AbstractECTargetableCommand
-
-
ECException
postApplyCalculationUsages
protected void postApplyCalculationUsages()
throws ECException
- Check for each order items if the tax amounts have been successfully
calculated.
-
-
ECException
postCalculationCodeApply
protected void postCalculationCodeApply(java.util.Hashtable orderItemABHash)
throws ECException
-
-
ECException
setCalculationUsages
protected void setCalculationUsages(java.lang.Integer[] calculationUsages)
setOrderCurrency
public void setOrderCurrency(java.lang.String orderCurrency)
setOrderItems
public void setOrderItems(OrderItemAccessBean[] orderItems)
throws ECSystemException
-
-
ECSystemException
setOrderItems
public void setOrderItems(java.util.Enumeration orderItems)
throws ECSystemException
-
-
ECSystemException
setOrderItemsI
protected void setOrderItemsI(OrderItemAccessBean[] orderItems)
setTaxCategoryIds
public void setTaxCategoryIds(java.lang.Integer[] taxCategoryIds)
validateParameters
public void validateParameters()
throws ECException
- Description copied from class:
AbstractECTargetableCommand
- Performs parameter checking. This method replaces checkParameters() in 5.1.
The default implementation of validateParameters() is a no op. It is the
responsibility of the command writers to implements this method if they want to
perform server side parameter checking.
-
- Specified by:
-
validateParameters
in interface
ECCommand
- Overrides:
-
validateParameters
in class
AbstractECTargetableCommand
-
-
ECException