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.order.commands.CSROrderPrepareCmdImpl
This is the default implementation of the CSROrderItemAddCmd
command.
This command calls the following Commands:
This command uses the following AccessBean:
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
static java.lang.String |
ERRTASK_NAME Error handling viewname for this command. |
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.optools.order.commands. CSROrderPrepareCmd |
defaultCommandClassName,
NAME |
Constructor Summary | |
---|---|
CSROrderPrepareCmdImpl() |
Method Summary | |
---|---|
protected
TypedProperty |
exceptionUtil(
TypedProperty prop, java.lang.Exception ex, java.lang.String methodName,
java.lang.String cmdName) This method sets up the response property when an exception occurs. |
protected
void |
executeOrderPrepare(java.lang.String orderId) This method calls OrderCalculateCmd and OrderPrepareCmd to prepare the order. |
java.lang.String |
getCustomerId() Returns customer ID. |
java.lang.String |
getFirstOrderId() Returns first order ID. |
java.util.Hashtable |
getNLS() Returns NLS properties. |
CommandContext |
getOrgCmdContext() Returns original command context. |
java.lang.Integer |
getOrgLangId() Returns original language ID. |
java.util.Locale |
getOrgLocale() Returns original Locale. |
TypedProperty |
getOrgReqProperties() Returns original request properties. |
java.lang.String |
getRedirectURL() Returns redirect URL. |
AccessVector |
getResources() Gets the access vector accessed by this command. |
java.lang.String |
getSecondOrderId() Returns the ID of the second order. |
protected
boolean |
isEmptyOrder(java.lang.String orderRefNum) Returns true if there is no order item in the order. |
void |
performExecute() This method prepares the orders that have at least one item. |
protected
void |
setCustomerId(java.lang.String newCustomerId) Sets customer ID. |
protected
void |
setFirstOrderId(java.lang.String newFirstOrderId) Sets first order ID. |
protected
void |
setNLS(java.util.Hashtable newNLS) Sets NLS properties. |
protected
void |
setOrgCmdContext(
CommandContext newOrgCmdContext) Sets original command context. |
protected
void |
setOrgLangId(java.lang.Integer newOrgLangId) Sets original language ID. |
protected
void |
setOrgLocale(java.util.Locale newOrgLocale) Sets original Locale. |
protected
void |
setOrgReqProperties(
TypedProperty newOrgReqProperties) Sets original request properties. |
protected
void |
setRedirectURL(java.lang.String newRedirectURL) Sets redirect URL. |
protected
void |
setSecondOrderId(java.lang.String newSecondOrderId) Sets second order ID. |
void |
validateParameters() Gets XMLObject from the GUI Notebook or Wizard and get ready to parse it. |
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 |
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. 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 |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static java.lang.String ERRTASK_NAME
Constructor Detail |
---|
public CSROrderPrepareCmdImpl()
Method Detail |
---|
protected TypedProperty exceptionUtil(TypedProperty prop, java.lang.Exception ex, java.lang.String methodName, java.lang.String cmdName)
prop
- The response typed property.ex
- The catched exception.methodName
- The name of the method with exception.cmdName
- The name of the command.protected void executeOrderPrepare(java.lang.String orderId) throws ECException
orderId
- The order ID.
ECException
- if OrderCalculateCmd or OrderPrepareCmd fails to
execute.public java.lang.String getCustomerId()
getCustomerId
in interface
CSROrderPrepareCmd
public java.lang.String getFirstOrderId()
getFirstOrderId
in interface
CSROrderPrepareCmd
public java.util.Hashtable getNLS()
public CommandContext getOrgCmdContext()
public java.lang.Integer getOrgLangId()
public java.util.Locale getOrgLocale()
public TypedProperty getOrgReqProperties()
public java.lang.String getRedirectURL()
public AccessVector getResources() throws ECException
getResources
in interface
ECCommand
getResources
in class
AbstractECTargetableCommand
ECException
- If the resource can not be
retrieved.public java.lang.String getSecondOrderId()
getSecondOrderId
in interface
CSROrderPrepareCmd
protected boolean isEmptyOrder(java.lang.String orderRefNum) throws java.lang.Exception
orderRefNum
- The order IDjava.lang.Exception
- if order accessBean can not be
instantiated from the orderRefNum.public void performExecute() throws ECException
It first calls the callPreCommands
method in the super class to
execute all pre-commands and then prepares the orders.
If there are any temporary addresses used in the order items, they will be converted into permanent addresses first before calling OrderPrepareCmd. Then these address will be changed back into temporary addreses.
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
- if orders can not be prepared.protected void setCustomerId(java.lang.String newCustomerId)
newCustomerId
- The customer ID.protected void setFirstOrderId(java.lang.String newFirstOrderId)
newFirstOrderId
- The ID of the first
order.protected void setNLS(java.util.Hashtable newNLS)
newNLS
- The NLS properties.protected void setOrgCmdContext(CommandContext newOrgCmdContext)
newOrgCmdContext
- The original command
context.protected void setOrgLangId(java.lang.Integer newOrgLangId)
newOrgLangId
- The original language ID.protected void setOrgLocale(java.util.Locale newOrgLocale)
newOrgLocale
- The original Locale.protected void setOrgReqProperties(TypedProperty newOrgReqProperties)
newOrgReqProperties
- The original request
properties.protected void setRedirectURL(java.lang.String newRedirectURL)
newRedirectURL
- The redirect URL.protected void setSecondOrderId(java.lang.String newSecondOrderId)
newSecondOrderId
- The second order ID.public void validateParameters() throws ECApplicationException
validateParameters
in interface
ECCommand
validateParameters
in class
CSRBaseControllerCommandImpl
ECApplicationException
- If the XML does not contain the required
parameters.