com.ibm.commerce.returns.commands
Class ReturnItemDeleteCmdImpl
- 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.ControllerCommandImpl
-
- com.ibm.commerce.returns.commands.ReturnBaseCmdImpl
-
- com.ibm.commerce.returns.commands.ReturnItemDeleteCmdImpl
-
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, ReturnItemDeleteCmd, Protectable, 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 ReturnItemDeleteCmdImpl extends ReturnBaseCmdImpl implements ReturnItemDeleteCmd
This is the default implementation of the controller commandReturnItemDeleteCmd
interface. It deletes a return merchandise authorization (RMA) item.Input parameters:
Name Description RMAItemId(required)
RMA item ID (this can be specified multiple times). outRMAName(optional)
the name to use for the name-value pair which will be passed to the redirected URL. URL (required)
the URL to be called when the command completes successfully. forUserId (optional)
it is specified when it is called by a CSR. Behaviour:
- Check to see if RMA exists. If not, return an error.
- If RMA item has receipts or credits, then don't delete the RMA item and throw com.ibm.commerce.exception.ECApplicationException with ECMessage.ECMessage._ERR_CANNOT_DELETE_RETURN_ITEM.
- Delete the RMA item.
It utilizes these access beans:
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.ibm.commerce.returns.commands.ReturnItemDeleteCmd
defaultCommandClassName, NAME
-
-
Constructor Summary
Constructors Constructor and Description ReturnItemDeleteCmdImpl()
This is the ReturnItemDeleteCmdImpl constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AccessVector
getResources()
This method gets the vector of resources accessed by this command.void
performExecute()
This method executes the main logic of the command.void
reset()
This method resets the command.void
setRequestProperties(TypedProperty aRequestProperties)
This method sets the request properties of this command implementation.void
validateParameters()
This method checks the mandatory parameters.-
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
-
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, 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.commerce.command.ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
-
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.AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
-
-
-
-
Constructor Detail
-
ReturnItemDeleteCmdImpl
public ReturnItemDeleteCmdImpl()
This is the ReturnItemDeleteCmdImpl constructor.
-
-
Method Detail
-
getResources
public AccessVector getResources() throws ECException
This method gets the vector of resources accessed by this command.- Specified by:
getResources
in interfaceECCommand
- Overrides:
getResources
in classAbstractECTargetableCommand
- Returns:
- The vector of resource action pairs - RMA access bean list.
- Throws:
ECException.
ECException
-
performExecute
public void performExecute() throws ECException
This method executes the main logic of the command.- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECApplicationException
- If the RMA item has credits or receipts against it, throws com.ibm.commerce.exception.ECApplicationException with ECMessage.ECMessage._ERR_CANNOT_DELETE_RETURN_ITEMECException
-
reset
public void reset()
This method resets the command.- Specified by:
reset
in interfacecom.ibm.websphere.command.Command
- Overrides:
reset
in classAbstractECTargetableCommand
-
setRequestProperties
public void setRequestProperties(TypedProperty aRequestProperties) throws ECApplicationException
This method sets the request properties of this command implementation.- Specified by:
setRequestProperties
in interfaceControllerCommand
- Overrides:
setRequestProperties
in classControllerCommandImpl
- Parameters:
aRequestProperties
- the request properties.- Throws:
ECApplicationException.
ECApplicationException
-
validateParameters
public void validateParameters() throws ECException
This method checks the mandatory parameters. It checks the following parameters:Parameters
storeid
- the store id
- iRMAitemId
- array of RMA item IDs
- URL
- the URL to be called when the command completes successfully.
- Specified by:
validateParameters
in interfaceECCommand
- Overrides:
validateParameters
in classAbstractECTargetableCommand
- Throws:
ECApplicationException
- If there is no store id specified or there is no RMA item array or there is no RMA item id is invalid, throws com.ibm.commerce.exception.ECApplicationException with ECMessage._ERR_BAD_MISSING_CMD_PARAMETERInvalidParameterValueException
- If there is no URL to be called on completion of the command, throws com.ibm.commerce.exception.InvalidParameterValueException with ECMessage._ERR_BAD_MISSING_CMD_PARAMETERECException
-
-