java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.returns.commands.CalculateReturnItemProductCreditCmdImpl
Default implementation of the
CalculateReturnItemProductCreditCmd
interface. Calculate the
amount of the original order item product price that this return mechandise
authorization (RMA) item qualifies for. This implementation calculates:
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. CalculateReturnItemProductCreditCmd |
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 | |
---|---|
CalculateReturnItemProductCreditCmdImpl() CalculateReturnItemProductCreditCmdImpl constructor. |
Method Summary | |
---|---|
protected
java.math.BigDecimal |
getLimitAmount() Return an amount that the returned product credit will be limited to. |
java.math.BigDecimal |
getProductCredit() Get the automatically calculated product credit for the returned/refunded item. |
void |
performExecute() Execute the command. |
void |
reset() Reset the command. |
void |
setOrderItemAB(
OrderItemAccessBean newOrderItemAB) Set the orderItem being returned/refunded. |
void |
setQuantity(java.lang.Double aQuantity) Set the quantity to be credited. |
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,
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 CalculateReturnItemProductCreditCmdImpl()
Method Detail |
---|
protected java.math.BigDecimal getLimitAmount() throws ECException
ECException
public java.math.BigDecimal getProductCredit()
getProductCredit
in interface
CalculateReturnItemProductCreditCmd
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void reset()
reset
in class
AbstractECTargetableCommand
public void setOrderItemAB(OrderItemAccessBean newOrderItemAB)
setOrderItemAB
in interface
CalculateReturnItemProductCreditCmd
newOrderItemAB
- The orderItem access
bean.public void setQuantity(java.lang.Double aQuantity)
setQuantity
in interface
CalculateReturnItemProductCreditCmd
aQuantity
- The quantity to be credited.public void validateParameters() throws ECException
Parameters
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECApplicationException
- If there is no StoreAccessBean or no
OrderItemAccessBean or a quantity has not be specified , throws
com.ibm.commerce.exception.ECApplicationException with
ECMessage._ERR_BAD_MISSING_CMD_PARAMETERECException