java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.returns.commands.CreditReturnItemCmdImpl
Default implementation of the CreditReturnItemCmdImpl
interface. Activate the refund for a return mechandise authorization (RMA) and
its items if there is one and it is approved.
Behaviour
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. CreditReturnItemCmd |
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 | |
---|---|
CreditReturnItemCmdImpl() CreditReturnItemCmdImpl constructor. |
Method Summary | |
---|---|
protected
RMAAccessBean |
getRMAAB() Get the RMA access bean. |
protected
java.util.Vector |
getRMAItemABs() Get the list of RMA item access beans. |
protected
java.sql.Timestamp |
getTimestampNow() This will get the NOW timestamp. |
protected
java.math.BigDecimal |
getTotalRefund() Get the total refund for the RMA. |
protected
boolean |
isRefund(
RMAAccessBean anRMAAB) Is there a refund? There is a refund if the total credit in the RMA is > 0. |
protected
boolean |
isRefundApproved(
RMAAccessBean anRMAAB, java.util.List theRMAItemABs) Is the refund approved? This calls the ApproveRefundPolicyCmd policy implementation. |
void |
performExecute() Execute the command. |
void |
reset() Reset the command. |
void |
setRMAAB(
RMAAccessBean anRMAAB) Set the RMA being accessed. |
void |
setRMAItemABs(java.util.Vector anRMAItemABList) Set the RMA items being 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 CreditReturnItemCmdImpl()
Method Detail |
---|
protected RMAAccessBean getRMAAB()
protected java.util.Vector getRMAItemABs()
protected java.sql.Timestamp getTimestampNow()
protected java.math.BigDecimal getTotalRefund() throws ECSystemException
ECSystemException
protected boolean isRefund(RMAAccessBean anRMAAB) throws ECSystemException
anRMAAB
- RMA access bean
ECSystemException
protected boolean isRefundApproved(RMAAccessBean anRMAAB, java.util.List theRMAItemABs) throws ECException
anRMAAB
- The RMA access bean.theRMAItemABs
- The list of RMA item access beans.ECException
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void reset()
reset
in class
AbstractECTargetableCommand
public void setRMAAB(RMAAccessBean anRMAAB)
setRMAAB
in interface
CreditReturnItemCmd
anRMAAB
- The RMA access bean.public void setRMAItemABs(java.util.Vector anRMAItemABList)
setRMAItemABs
in interface
CreditReturnItemCmd
anRMAItemABList
- The RMA item access bean
vector.public void validateParameters() throws ECException
Parameters
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECApplicationException
- If there is no RMAABean or there is no
vector of RMAItemAccessBean, throws
com.ibm.commerce.exception.ECApplicationException with
ECMessage._ERR_BAD_MISSING_CMD_PARAMETERECException