com.ibm.commerce.tools.optools.returns.commands
Class CSRReturnBaseCmdImpl

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
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, ToolsControllerCommand
Direct Known Subclasses:
CSRReturnCancelCmdImpl, CSRReturnCreateCopyCmdImpl, CSRReturnItemAddCmdImpl, CSRReturnItemComponentUpdateCmdImpl, CSRReturnItemDeleteCmdImpl, CSRReturnItemUpdateCmdImpl, CSRReturnPrepareCmdImpl, CSRReturnProcessCmdImpl, CSRReturnRestoreCopyCmdImpl, CSRReturnUpdateCmdImpl

public abstract class CSRReturnBaseCmdImpl
extends CSRBaseControllerCommandImpl

 Brief Description:

 	This class is the base class for all the CSR return commands.


Field Summary
static java.lang.String COPYRIGHT
           
protected  java.lang.String customerId
           
static java.lang.String ERRTASK_NAME
           
protected  CommandContext origCmdContext
           
protected  TypedProperty origReqProperties
           
protected  java.lang.String redirectURL
           
protected  java.lang.String returnId
           
protected  java.util.Hashtable returnResBun
           
protected  java.util.Hashtable xmlRoot
           
 
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.tools.command.ToolsControllerCommand
NAME
 
Fields inherited from interface com.ibm.commerce.command.ECCommand
defaultCommandClassName
 
Constructor Summary
CSRReturnBaseCmdImpl()
          CSRReturnBaseCmdImpl constructor.
 
Method Summary
protected  TypedProperty exceptionUtil(TypedProperty prop, java.lang.Exception ex, java.lang.String methodName, java.lang.String cmdName)
          Common exception code for all CSR return commands.
 java.lang.String getCustomerId()
          Getter method to get the customer id that is used to set the forUserId parameter in the request property when calling a command.
 java.util.Hashtable getNLS()
          Getter method to get reference to the contents of the property file.
 CommandContext getOrigCmdContext()
          Getter method to get the commands original command context.
 TypedProperty getOrigReqProperties()
          Getter method to get the commands original request property.
 java.lang.String getRedirectURL()
          Getter method to get the redirect url.
 AccessVector getResources()
          Gets the access vector accessed by this command.
 java.lang.String getReturnId()
          Get the return id.
protected abstract  void parseInputXMLObject(java.util.Hashtable xmlRoot)
          Method to parse and retrieve the commands input parameters.
 void setCustomerId(java.lang.String newCustomerId)
          Sets the customer id
protected  void setNLS(java.util.Hashtable newNLS)
          Sets the reference to the contents of the property file.
 void setOrigCmdContext(CommandContext newOrigCmdContext)
          Sets the original command context.
 void setOrigReqProperties(TypedProperty newOrigReqProperties)
          Sets the original request properties.
 void setRedirectURL(java.lang.String newRedirectURL)
          Sets the redirect url.
 void setReturnId(java.lang.String newReturnId)
          Sets the return id.
 java.lang.String traceFormat(TypedProperty prop)
          Trace format method.
 void validateParameters()
           Validate the parameters used in the current command by: - Setting the reference to the returns.ReturnsNLS property file.
 
Methods inherited from class com.ibm.commerce.tools.optools.order.commands.CSRBaseControllerCommandImpl
callPreCommands, findCmdInterfaceName, getIfExePreCmdChains, getPreCmdChain, setIfExePreCmdChains, setPreCmdChain
 
Methods inherited from class com.ibm.commerce.tools.command.ToolsControllerCommandImpl
getViewInputProperties, setRequestProperties
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, 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, performExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, performExecute, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT

customerId

protected java.lang.String customerId

ERRTASK_NAME

public static final java.lang.String ERRTASK_NAME

origCmdContext

protected CommandContext origCmdContext

origReqProperties

protected TypedProperty origReqProperties

redirectURL

protected java.lang.String redirectURL

returnId

protected java.lang.String returnId

returnResBun

protected java.util.Hashtable returnResBun

xmlRoot

protected java.util.Hashtable xmlRoot
Constructor Detail

CSRReturnBaseCmdImpl

public CSRReturnBaseCmdImpl()
CSRReturnBaseCmdImpl constructor.
Method Detail

exceptionUtil

protected TypedProperty exceptionUtil(TypedProperty prop,
                                      java.lang.Exception ex,
                                      java.lang.String methodName,
                                      java.lang.String cmdName)
Common exception code for all CSR return commands.

getCustomerId

public java.lang.String getCustomerId()
Getter method to get the customer id that is used to set the forUserId parameter in the request property when calling a command.
Returns:
The customer id.

getNLS

public java.util.Hashtable getNLS()
Getter method to get reference to the contents of the property file.
Returns:
The reference to the contents of the property file.

getOrigCmdContext

public CommandContext getOrigCmdContext()
Getter method to get the commands original command context.
Returns:
The original command context.

getOrigReqProperties

public TypedProperty getOrigReqProperties()
Getter method to get the commands original request property.
Returns:
The original request properties.

getRedirectURL

public java.lang.String getRedirectURL()
Getter method to get the redirect url.
Returns:
The redirect url.

getResources

public AccessVector getResources()
                          throws ECException
Gets the access vector accessed by this command. The default implementation returns null indicating that no protectable resource is accessed by this command.

Overrides:
getResources in class AbstractECTargetableCommand
Returns:
A vector of resource action pairs

getReturnId

public java.lang.String getReturnId()
Get the return id.
Returns:
The return id.

parseInputXMLObject

protected abstract void parseInputXMLObject(java.util.Hashtable xmlRoot)
                                     throws ECApplicationException
Method to parse and retrieve the commands input parameters.
Parameters:
xmlRoot - The xml stream represented in a java Hashtable.

setCustomerId

public void setCustomerId(java.lang.String newCustomerId)
Sets the customer id
Parameters:
newCustomerId - The customer id.

setNLS

protected void setNLS(java.util.Hashtable newNLS)
Sets the reference to the contents of the property file.
Parameters:
newNLS - The national language messages to use in the command.

setOrigCmdContext

public void setOrigCmdContext(CommandContext newOrigCmdContext)
Sets the original command context.
Parameters:
newOrigCmdContext - The new command context.

setOrigReqProperties

public void setOrigReqProperties(TypedProperty newOrigReqProperties)
Sets the original request properties.
Parameters:
newOrigReqProperties - The new request properties.

setRedirectURL

public void setRedirectURL(java.lang.String newRedirectURL)
Sets the redirect url.
Parameters:
newRedirectURL - The redirect url to use when command terminates.

setReturnId

public void setReturnId(java.lang.String newReturnId)
Sets the return id.
Parameters:
newReturnId - The return id.

traceFormat

public java.lang.String traceFormat(TypedProperty prop)
Trace format method.
Parameters:
prop - A typed property.

validateParameters

public void validateParameters()
                        throws ECApplicationException
 Validate the parameters used in the current command by:
   - Setting the reference to the returns.ReturnsNLS property file.
   - Storing the xml input data stream into the xmlRoot java Hashtable datastructure.
Overrides:
validateParameters in class CSRBaseControllerCommandImpl
Following copied from class: com.ibm.commerce.tools.optools.order.commands.CSRBaseControllerCommandImpl
Throws:
ECApplicationException -