com.ibm.commerce.returns.commands
Class AdminReturnApproveCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.returns.commands.AdminReturnApproveCmdImpl
- All Implemented Interfaces:
- AccCommand, AdminReturnApproveCmd, ControllerCommand, ECCommand, ECTargetableCommand, Protectable
- public class AdminReturnApproveCmdImpl
- extends ControllerCommandImpl
- implements AdminReturnApproveCmd
Approve a return mechandise authorization (RMA) by changing its status to 'APP'.
Parameters
- RMAId (mandatory)
- Identifier of the RMA that is to be approved.
- URL (mandatory)
- URL to redirect to.
- storeId (mandatory)
- Identifier of the store that owns the RMA.
Behaviour
- The RMA must be in status 'PND' to be approved. If not, an ECApplicationException
exception is generated with message _ERR_RMA_IN_INVALID_STATE_FOR_COMMAND.
- If an RMA item has not already been approved (either in status 'APP' or 'MAN') then
the item is moved to status 'MAN'.
- After all items have been marked approved, the RMA is changed to status 'APP'.
- The URL is setup for redirection.
- The task command ExtendAdminReturnApproveCmd is called.
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setRequestProperties, setResponseProperties, setRetriable, setViewInputProperties |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
AdminReturnApproveCmdImpl
public AdminReturnApproveCmdImpl()
- AdminReturnApproveCmdImpl constructor.
extendCommand
protected void extendCommand()
throws ECException
- Extend the command. This is the last method called by performExecute().
This implementation calls the task command ExtendAdminReturnApprove.
getResources
public AccessVector getResources()
throws ECException
- Gets the vector of resources accessed by this command.
- Specified by:
getResources
in interface ECCommand
- Overrides:
getResources
in class AbstractECTargetableCommand
- Returns:
- A vector of resource action pairs. The RMA access bean is returned.
getRMAAB
protected RMAAccessBean getRMAAB()
- Get the RMA.
- Returns:
- The RMA access bean.
getTimestampNow
protected java.sql.Timestamp getTimestampNow()
- This will get the NOW timestamp. It only gets set on the first call.
- Returns:
- The NOW timestamp.
getURL
protected java.lang.String getURL()
- Get the URL parameter.
- Returns:
- The URL parameter.
isApproved
protected boolean isApproved(RMAItemAccessBean anRMAItemAB)
throws ECSystemException
- Check to see if an RMA item has been approved (status 'APP' or 'MAN').
- Parameters:
anRMAItemAB
- The RMA item access bean that is checked for approval.- Returns:
- true if approved; false otherwise.
performExecute
public void performExecute()
throws ECException
- Execute the command.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.
reset
public void reset()
- Reset the command.
- Overrides:
reset
in class AbstractECTargetableCommand
validateParameters
public void validateParameters()
throws ECException
- Check mandatory parameters.
- Specified by:
validateParameters
in interface ECCommand
- Overrides:
validateParameters
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
ECException.
-