public class CalculateReturnItemAdjustmentCreditCmdImpl extends TaskCommandImpl implements CalculateReturnItemAdjustmentCreditCmd
CalculateReturnItemAdjustmentCreditCmd interface.
Calculate the adjustment credit for a return merchandise authorization (RMA) item. Entries in the RMAIADJCRD
table are first removed then re-calculated for the RMA item based on the adjustments
of the order item. Each order item adjustment is pro-rated based on the RMA quantity.
This command also sets the total adjustment credit which the calling command can retrieve.
Utilizes these access beans
defaultCommandClassName, NAME| Constructor and Description |
|---|
CalculateReturnItemAdjustmentCreditCmdImpl()
CalculateReturnItemAdjustmentCreditCmdImpl constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.math.BigDecimal |
getAdjustmentCredit()
Get the total calculated adjustment credit for the returned/refunded item.
|
void |
performExecute()
Execute the command.
|
void |
reset()
Reset the command.
|
void |
setOrderItemAB(OrderItemAccessBean anOrderItemAB)
Set the orderItem being returned/refunded.
|
void |
setQuantity(java.lang.Double aQuantity)
Set the quantity to be credited.
|
void |
setRMAItemAB(RMAItemAccessBean anRMAItemAB)
Set the RMA Item access bean which will have its adjustment credit updated.
|
void |
validateParameters()
Check mandatory parameters.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiescheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiespublic CalculateReturnItemAdjustmentCreditCmdImpl()
public java.math.BigDecimal getAdjustmentCredit()
getAdjustmentCredit in interface CalculateReturnItemAdjustmentCreditCmdpublic void performExecute()
throws ECException
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECExceptionpublic void reset()
reset in interface com.ibm.websphere.command.Commandreset in class AbstractECTargetableCommandpublic void setOrderItemAB(OrderItemAccessBean anOrderItemAB)
setOrderItemAB in interface CalculateReturnItemAdjustmentCreditCmdanOrderItemAB - The orderItem access bean.public void setQuantity(java.lang.Double aQuantity)
setQuantity in interface CalculateReturnItemAdjustmentCreditCmdaQuantity - The quantity to be credited.public void setRMAItemAB(RMAItemAccessBean anRMAItemAB)
setRMAItemAB in interface CalculateReturnItemAdjustmentCreditCmdanRMAItemAB - The RMA item access bean.public void validateParameters()
throws ECException
Parameters
validateParameters in interface ECCommandvalidateParameters in class AbstractECTargetableCommandECApplicationException - If there is no StoreAccessBean or there is no RMAItemAccessBean or there is no OrderItemAccessBean or
a quantity has not be specified , throws com.ibm.commerce.exception.ECApplicationException
with ECMessage._ERR_BAD_MISSING_CMD_PARAMETERECException