|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.returns.commands.CalculateReturnItemAdjustmentCreditCmdImpl
Calculate the adjustment credit for a return mechandise 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.
Fields inherited from class com.ibm.commerce.command.AbstractECCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.returns.commands.CalculateReturnItemAdjustmentCreditCmd |
COPYRIGHT, defaultCommandClassName, NAME |
Constructor Summary | |
CalculateReturnItemAdjustmentCreditCmdImpl()
CalculateReturnItemAdjustmentCreditCmdImpl constructor. |
Method Summary | |
protected java.math.BigDecimal |
calcSpecificAdjustmentCredit(OrderItemAccessBean anOrderItemAB,
OrderItemAdjustmentAccessBean anOrderItemAdjAB)
Calculate the adjustment credit for a specific order item adjustment. |
java.math.BigDecimal |
getAdjustmentCredit()
Get the total calculated adjustment credit for the returned/refunded item. |
protected java.math.BigDecimal |
getLimitAmount(OrderItemAdjustmentAccessBean anOrderItemAdjAB)
Return an amount that the adjustment credit will be limited to. |
protected OrderItemAccessBean |
getOrderItemAB()
Get the access bean of the order item being returned. |
protected RMAItemAccessBean |
getRMAItemAB()
Get the RMA item access bean for which the adjustment credit is being calculated. |
void |
performExecute()
Execute the command. |
protected void |
removeOldAdjustmentCredits()
Remove existing adjustment credits for the rma item being processed. |
void |
reset()
Reset the command. |
protected void |
setAdjustmentCredit(java.math.BigDecimal newAdjustmentCredit)
Set the total adjustment credit for the rma item. |
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. |
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Constructor Detail |
public CalculateReturnItemAdjustmentCreditCmdImpl()
Method Detail |
protected java.math.BigDecimal calcSpecificAdjustmentCredit(OrderItemAccessBean anOrderItemAB, OrderItemAdjustmentAccessBean anOrderItemAdjAB) throws ECException
anOrderItemAB
- The access bean of the order item being examined.anOrderItemAdjAB
- The access bean of the order item adjustment being examined.public java.math.BigDecimal getAdjustmentCredit()
getAdjustmentCredit
in interface CalculateReturnItemAdjustmentCreditCmd
protected java.math.BigDecimal getLimitAmount(OrderItemAdjustmentAccessBean anOrderItemAdjAB) throws ECException
anOrderItemAdjAB
- The access bean of the order item adjustment being examined.protected OrderItemAccessBean getOrderItemAB()
protected RMAItemAccessBean getRMAItemAB()
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.protected void removeOldAdjustmentCredits() throws ECSystemException
public void reset()
reset
in class AbstractECCommand
protected void setAdjustmentCredit(java.math.BigDecimal newAdjustmentCredit)
newAdjustmentCredit
- The total adjustment credit amount.public void setOrderItemAB(OrderItemAccessBean anOrderItemAB)
setOrderItemAB
in interface CalculateReturnItemAdjustmentCreditCmd
anOrderItemAB
- The orderItem access bean.public void setQuantity(java.lang.Double aQuantity)
setQuantity
in interface CalculateReturnItemAdjustmentCreditCmd
aQuantity
- The quantity to be credited.public void setRMAItemAB(RMAItemAccessBean anRMAItemAB)
setRMAItemAB
in interface CalculateReturnItemAdjustmentCreditCmd
anRMAItemAB
- The RMA item access bean.public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
ECException.
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |