com.ibm.commerce.returns.commands
Class CalculateRMAApprovalCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.TaskCommandImpl
-
- com.ibm.commerce.returns.commands.CalculateRMAApprovalCmdImpl
-
- All Implemented Interfaces:
- com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CalculateRMAApprovalCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
public class CalculateRMAApprovalCmdImpl extends TaskCommandImpl implements CalculateRMAApprovalCmd
Default implementation of theCalculateRMAAproval
interface. Command used for calculating overall status of return merchandise authorization (RMA). If any RMA item is not approved (RMAITEM.STATUS='APP') or manually approved (RMAITEM.STATUS='MAN'), then the RMA is set to pending (RMA.STATUS='PND'). Otherwise, it is set to approved (RMA.STATUS='APP').Utilizes these access beans
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.ibm.commerce.returns.commands.CalculateRMAApprovalCmd
defaultCommandClassName, NAME
-
-
Constructor Summary
Constructors Constructor and Description CalculateRMAApprovalCmdImpl()
CalculateRMAApprovalCmdImpl constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
calculateRMAApproval()
Loop through each RMAitem and determine the rolled up status of RMA.boolean
isRMAApproved()
Whether RMA was approvedvoid
performExecute()
Execute the command.void
reset()
This method is called after a command has been executed.void
setRMAAB(RMAAccessBean rmaAB)
Set the RMA being accessed.void
setRMAItemABVector(java.util.Vector vRMAItemAB)
Set the RMA items to evaluate for RMA approvalvoid
validateParameters()
Check mandatory parameters.-
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
-
-
-
Constructor Detail
-
CalculateRMAApprovalCmdImpl
public CalculateRMAApprovalCmdImpl()
CalculateRMAApprovalCmdImpl constructor.
-
-
Method Detail
-
calculateRMAApproval
public void calculateRMAApproval() throws ECSystemException
Loop through each RMAitem and determine the rolled up status of RMA.- Throws:
ECSystemException
-
isRMAApproved
public boolean isRMAApproved()
Whether RMA was approved- Specified by:
isRMAApproved
in interfaceCalculateRMAApprovalCmd
- Returns:
- true if approved; otherwise false.
-
performExecute
public void performExecute() throws ECException
Execute the command.- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
-
reset
public void reset()
Description copied from class:AbstractECTargetableCommand
This method is called after a command has been executed. It is used to reset its states variables. After the call to reset, the command should be able to be executed again.- Specified by:
reset
in interfacecom.ibm.websphere.command.Command
- Overrides:
reset
in classAbstractECTargetableCommand
-
setRMAAB
public void setRMAAB(RMAAccessBean rmaAB)
Set the RMA being accessed.- Specified by:
setRMAAB
in interfaceCalculateRMAApprovalCmd
- Parameters:
rmaAB
- the RMA access bean.
-
setRMAItemABVector
public void setRMAItemABVector(java.util.Vector vRMAItemAB)
Set the RMA items to evaluate for RMA approval- Specified by:
setRMAItemABVector
in interfaceCalculateRMAApprovalCmd
- Parameters:
vRMAItemAB
- vector of RMA item access beans.
-
validateParameters
public void validateParameters() throws ECException
Check mandatory parameters. Checks the following parameters:Parameters
- RMAAB
- RMAAccessBean of the RMA
- RMAItemAB
- RMAItemAccessBean of the RMA item
- Specified by:
validateParameters
in interfaceECCommand
- Overrides:
validateParameters
in classAbstractECTargetableCommand
- Throws:
ECApplicationException
- If there is no RMAABean or there is no RMAItemAccessBean, throws com.ibm.commerce.exception.ECApplicationException with ECMessage._ERR_BAD_MISSING_CMD_PARAMETERECException
- RMAAB
-
-