java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.returns.commands.AutoApproveReturnItemCmdImpl
Overall Task command used for determining if a return mechandise authorization (RMA) item may be approved programatically. Calls AutoApproveReturnItemStandardChecksCmd and AutoApproveReturnItemPolicyCmd for approval logic. Gets a list of all auto-approve deny reasons for the current store, calls AutoApproveReturnItemStandardChecksCmd passing in list of possible deny reasons, calls AutoApproveReturnItemPolicyCmd passing in list of possible deny reasons, and based on list of actual deny reasons passed back, calculates new approval status and logs deny reasons against the RMA item.
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. AutoApproveReturnItemCmd |
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 | |
---|---|
AutoApproveReturnItemCmdImpl() AutoApproveReturnItemCmdImpl constructor. |
Method Summary | |
---|---|
protected
void |
autoApproveRMAItem() Calculate whether RMA item can be approved programatically. |
protected
java.util.Vector |
convertDenyReasons(java.util.List RMAItemDenyReasonList) Convert List of Deny Reason codes to DenyReason_ids. |
protected
void |
loadDenyReasons() Gets list of deny reasons, code and id, applicable to current store. |
void |
performExecute() Execute the command. |
void |
reset() This method should be called after a command has been executed to reset its states variables. |
void |
setRMAAB(
RMAAccessBean rmaAB) Set the RMA being accessed. |
void |
setRMAItemAB(
RMAItemAccessBean RMAItemAB) Set the RMA item being accessed. |
void |
validateParameters() Checks the following 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 AutoApproveReturnItemCmdImpl()
Method Detail |
---|
protected void autoApproveRMAItem() throws FinderException, java.rmi.RemoteException, javax.naming.NamingException, CreateException, ECException
FinderException
java.rmi.RemoteException
javax.naming.NamingException
CreateException
ECException
protected java.util.Vector convertDenyReasons(java.util.List RMAItemDenyReasonList) throws FinderException, java.rmi.RemoteException, javax.naming.NamingException, CreateException, ECException
RMAItemDenyReasonList
- List of deny reason codesFinderException
java.rmi.RemoteException
javax.naming.NamingException
CreateException
ECException
protected void loadDenyReasons() throws FinderException, java.rmi.RemoteException, javax.naming.NamingException, CreateException, ECException
FinderException
java.rmi.RemoteException
javax.naming.NamingException
CreateException
ECException
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void reset()
AbstractECTargetableCommand
reset
in class
AbstractECTargetableCommand
public void setRMAAB(RMAAccessBean rmaAB)
setRMAAB
in interface
AutoApproveReturnItemCmd
rmaAB
- the RMA access bean.public void setRMAItemAB(RMAItemAccessBean RMAItemAB)
setRMAItemAB
in interface
AutoApproveReturnItemCmd
public void validateParameters() throws ECException
Parameters
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECApplicationException
- If there is no RMAItemAB or if there is no
RMAAB or if there is no TradingID in the RMAAB, throws
com.ibm.commerce.exception.ECApplicationException with
ECMessage._ERR_BAD_MISSING_CMD_PARAMETERECException