com.ibm.commerce.returns.commands
Class ReturnItemComponentUpdateCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.returns.commands.ReturnItemComponentUpdateCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, ReturnItemComponentUpdateCmd

public class ReturnItemComponentUpdateCmdImpl
extends ControllerCommandImpl
implements ReturnItemComponentUpdateCmd

Default implementation of the controller command ReturnItemComponentUpdateCmd interface. Command to update the component of a return mechandise authorization (RMA) item.

Parameters

RMAItemCmpId_i (mandatory)
Identifier of the RMA item component is to be changed.
receive_i
Whether the item should be received from the customer ('N', 'Y'). Changes the SHOULDRECEIVE column of table RMAITEMCMP.
URL (mandatory)
URL to redirect to.
storeId (mandatory)
Identifier of the store that owns the RMA.
All parameters ending with the same _i are grouped together. This way you can change multiple RMA item components at once.

Behaviour

Utilizes these access beans

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.returns.commands. ReturnItemComponentUpdateCmd
COPYRIGHT, defaultCommandClassName, NAME, RECEIVE_NO, RECEIVE_YES
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Constructor Summary
ReturnItemComponentUpdateCmdImpl()
          ReturnItemComponentUpdateCmdImpl constructor.
 
Method Summary
protected  java.lang.String getReceive(java.lang.Integer index)
          Get the receive value for the specified index.
  AccessVector getResources()
          Gets the vector of resources accessed by this command.
protected   RMAItemComponentAccessBean getRMAItemComponentAB(java.lang.Integer index)
          Get the RMA item component access bean for the specified index.
protected  java.lang.Long getRMAItemComponentId(java.lang.Integer index)
          Get the RMA item component id for the appropriate index.
protected  java.util.List getRMAs()
          Get the RMAs related to the components.
protected  java.lang.String getURL()
          Get the redirection URL.
 void performExecute()
          Execute the command.
 void reset()
          Reset the command.
 void setRequestProperties( TypedProperty aRequestProperties)
          Sets the request properties.
 void validateParameters()
          Check 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, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, 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
 
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.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, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

Constructor Detail

ReturnItemComponentUpdateCmdImpl

public ReturnItemComponentUpdateCmdImpl()
ReturnItemComponentUpdateCmdImpl constructor.
Method Detail

getReceive

protected java.lang.String getReceive(java.lang.Integer index)
Get the receive value for the specified index. If the receive value is "" (empty string) then return null.
Parameters:
index - which instance of the retreive value to get
Returns:
The receive value.

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:
The vector of resource action pairs - RMA access beans.
ECException

getRMAItemComponentAB

protected RMAItemComponentAccessBean getRMAItemComponentAB(java.lang.Integer index)
Get the RMA item component access bean for the specified index. The access beans have already been created in validateParameters.
Parameters:
index - The index.
Returns:
The RMA item component access bean.

getRMAItemComponentId

protected java.lang.Long getRMAItemComponentId(java.lang.Integer index)
                                        throws InvalidParameterValueException
Get the RMA item component id for the appropriate index.
Parameters:
index - which instance of the RMA component id value to get
Returns:
The RMA item component id value.
InvalidParameterValueException

getRMAs

protected java.util.List getRMAs()
                          throws ECSystemException
Get the RMAs related to the components.
Returns:
The list of RMA access beans.
ECSystemException

getURL

protected java.lang.String getURL()
Get the redirection URL.
Returns:
The URL.

performExecute

public void performExecute()
                    throws ECException
Execute the command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
ECException

reset

public void reset()
Reset the command.
Overrides:
reset in class AbstractECTargetableCommand

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
                          throws ECApplicationException
Description copied from interface: ControllerCommand
Sets the request properties. The WebController calls this method before invoking the execute method in this command to set the request properties for this command. It is the responsibility of the implementer of the ControllerCommand to extract the required input parameters from the request properties and perform parameter checking.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
aRequestProperties - request properties
ECApplicationException

validateParameters

public void validateParameters()
                        throws ECException
Check mandatory parameters. Check parameters.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECApplicationException - If required parameters not specified or parameters are invalid, throws com.ibm.commerce.exception.ECApplicationException with ECMessage._ERR_BAD_MISSING_CMD_PARAMETER
ECException