com.ibm.commerce.returns.commands
Class ReturnProcessCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.returns.commands.ReturnProcessCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, ReturnProcessCmd
- public class ReturnProcessCmdImpl
- extends ControllerCommandImpl
- implements ReturnProcessCmd
Finalizes the agreement between the merchant and the customer as to the terms of a return mechandise authorization (RMA).
Parameters
- RMAId (mandatory)
- The Id of the RMA to finalize.
- refundPolicyId (optional)
- The policy Id of the refund mechanism to use. This is mandatory if there is more
than one possible refund policy and it was not specified in a prior call to ReturnProcess for this RMA.
- URL (mandatory)
- The URL to redirect to if the RMA is approved.
- URL2 (optional)
- The URL to redirect to if the RMA is not approved. If not specified, the value specified in the URL parameter will be used.
- RMAExpiryURL (optional)
- The URL to redirect to if the RMA had expired and was re-prepared.
Behaviour
- Checks to see if the RMA exists. If not, ECApplicationException is thrown with message
_ERR_RMA_IN_INVALID_STATE_FOR_COMMAND.
- Checks to see if a refund policy has been specified, either within the command call or previously,
or because there is only one choice. If not, returns an error. If not, ECApplicationException
is thrown with message_ERR_BAD_MISSING_CMD_PARAMETER.
- Checks to see if the RMA has been prepared. If not, ECApplicationException is thrown with message
_ERR_RMA_IN_INVALID_STATE_FOR_COMMAND.
- Calls the RePrepareExpiredRMACmd task command to check to see if the RMAGOODFOR time frame has
expired for any RMA Item. If so, calls the ReturnPrepare command and a redirection will take
place to the RMAExpiryURL if it is specified. If the RMAExpiryURL parameter is not specified, then
ReturnProcess completes normally.
- Calls the CalculateRMAApprovalCmd task command to calculate the overall status of the Return. If
the RMA is approved, then the command marks it as approved (RMA.status='APP'), logs the authorization notice, and
redirects to the URL specified. If the RMA is not approved, then the command marks it as
pending (RMA.status='PND') and redirects to URL2.
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 |
ReturnProcessCmdImpl
public ReturnProcessCmdImpl()
- ReturnProcessCmdImpl constructor.
extendCommand
protected void extendCommand()
throws ECException
- Extend the command here. This implementation calls the task command ExtendReturnProcessCmd.
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:
- AccessVector - a vector of resource action pairs
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.
-