com.ibm.commerce.tools.optools.returns.commands
Class CSRReturnItemAddCmdImpl
java.lang.Object
CacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.ControllerCommandImpl
com.ibm.commerce.tools.command.ToolsControllerCommandImpl
com.ibm.commerce.tools.optools.order.commands.CSRBaseControllerCommandImpl
com.ibm.commerce.tools.optools.returns.commands.CSRReturnBaseCmdImpl
com.ibm.commerce.tools.optools.returns.commands.CSRReturnItemAddCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, CSRReturnItemAddCmd, ECCommand, ECTargetableCommand, Protectable, ToolsControllerCommand
- public class CSRReturnItemAddCmdImpl
- extends CSRReturnBaseCmdImpl
- implements CSRReturnItemAddCmd
Default implementation of CSRReturnItemAddCmd. Wrapper for implementation of ReturnItemAddCmd.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
COPYRIGHT
IBM copyright notice field. |
protected java.util.Vector |
returnItemsToBeAdded
List of items to be added to Return. |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, 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, reset, 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, setRequestProperties, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright notice field.
- See Also:
- Constant Field Values
returnItemsToBeAdded
protected java.util.Vector returnItemsToBeAdded
- List of items to be added to Return. Vector containing Hashtables, with each hashtable representing a return item.
CSRReturnItemAddCmdImpl
public CSRReturnItemAddCmdImpl()
executeReturnItemAdd
protected void executeReturnItemAdd()
throws java.lang.Exception
- Sets up the input request property for the ReturnItemAddCmd command and calls the command.
-
- Throws:
- java.lang.Exception - If a return reason is not found. If the command factory class does not return a instance of the ReturnItemAddCmd command.
getResources
public AccessVector getResources()
throws ECException
- Gets the access vector used by command. Protected resource is store.
-
- Specified by:
- getResources in interface ECCommand
- Overrides:
- getResources in class CSRReturnBaseCmdImpl
-
- Returns:
- vector of resource action pairs
- Throws:
- ECException
- See Also:
- AccessVector
getReturnItemsToBeAdded
public java.util.Vector getReturnItemsToBeAdded()
- Gets list of items to be added to Return.
-
- Returns:
- set of hashtables where each hashtable represents data for a return item that will be passed to the ReturnItemAddCmd.
parseInputXMLObject
protected void parseInputXMLObject(java.util.Hashtable xmlRoot)
throws ECApplicationException
- Extracts and stores data passed in the XML parameter. Calls setReturnId with returnId, setCustomerId with customerId, and setReturnItemsToBeAdded with data in the addReturnItem node.
-
- Specified by:
- parseInputXMLObject in class CSRReturnBaseCmdImpl
-
- Parameters:
- xmlRoot - Representation of the xml data stream as a java Hashtable
- Throws:
- ECApplicationException - If customerId is null or empty.
performExecute
public void performExecute()
throws ECException
- Calls executeReturnItemAdd. In preparation, makes a copy of the command context and request properties. Sets up the redirect URL by putting the redirect URL parameter into the response property. Puts the returnId output parameter from implementation of ReturnItemAddCmd into the response property
-
- Specified by:
- performExecute in interface ECCommand
- Overrides:
- performExecute in class AbstractECTargetableCommand
-
- Throws:
- ECException - If item is not successfully added to return
setReturnItemsToBeAdded
public void setReturnItemsToBeAdded(java.util.Vector newReturnItemsToBeAdded)
- Sets list of items to be added to Return.
-
- Parameters:
- newReturnItemsToBeAdded - vector of hashtables where each hashtable represents data for a return item that will be passed to the ReturnItemAddCmd.
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.