java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.returns.commands.CalculateReturnTaxCmdImpl
Default implementation of the CalculateReturnTaxCmd
interface.
Calculate the tax for a return mechandise authorization (RMA) item. Calls
GetReturnTaxesCmd for RMA items associated with an order item. Tax credit for
RMA items not associated with an order item defaults to zero.
Utilizes these access beans
Field Summary |
---|
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.returns.commands. CalculateReturnTaxCmd |
COPYRIGHT,
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CalculateReturnTaxCmdImpl() ReturnItemCreditCalculateCmdImpl constructor. |
Method Summary | |
---|---|
protected
void |
applyRMATaxes(java.lang.Long aRMAId, java.lang.Long aOrderId,
java.util.Hashtable aOrderRMATaxes) Set taxes in RMA specific tax database tables, but not in the RMA items. |
protected
MonetaryAmount |
calculateRMAItemsTaxCredit(
RMAItemAccessBean aRMAItemAB,
OrderItemAccessBean aItemAB) Calculate tax credit for a RMA item |
java.util.Vector |
getTaxCredits() Get the calculated tax credits for the returned/refunded item. |
void |
initRMATaxes(java.lang.Long aRMAId) Clean out RMA item tax credit that may already be in database |
void |
performExecute() Execute the command. |
void |
setRMAItemABs(java.util.Vector aRMAItemABVec) Set the vector of RMAItems for which the tax credits are to be calculated. |
void |
setTaxCredits(java.lang.Long RMAItemId,
MonetaryAmount aItemTaxCredit) Insert tax credits in vector in the same order as command was called |
void |
validateParameters() Check mandatory parameters. |
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 |
Constructor Detail |
---|
public CalculateReturnTaxCmdImpl()
Method Detail |
---|
protected void applyRMATaxes(java.lang.Long aRMAId, java.lang.Long aOrderId, java.util.Hashtable aOrderRMATaxes) throws ECException
aRMAId
- RMA idaOrderId
- Order IdaOrderRMATaxes
- RMA tax credits based on amount on orderECException
protected MonetaryAmount calculateRMAItemsTaxCredit(RMAItemAccessBean aRMAItemAB, OrderItemAccessBean aItemAB) throws ECException
aRMAItemAB
- RMA item access beanaItemAB
- order item access beanECException
public java.util.Vector getTaxCredits()
getTaxCredits
in interface
CalculateReturnTaxCmd
public void initRMATaxes(java.lang.Long aRMAId) throws ECException
aRMAId
- RMA idECException
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void setRMAItemABs(java.util.Vector aRMAItemABVec)
setRMAItemABs
in interface
CalculateReturnTaxCmd
aRMAItemABVec
- the RMAItem acccess bean
vector.public void setTaxCredits(java.lang.Long RMAItemId, MonetaryAmount aItemTaxCredit) throws ECException
RMAItemId
- RMA item idaItemTaxCredit
- RMA item tax creditECException
public void validateParameters() throws ECException
Parameters
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECApplicationException
- If there is no StoreAccessBean, throws
com.ibm.commerce.exception.ECApplicationException with
ECMessage._ERR_BAD_MISSING_CMD_PARAMETERECException