com.ibm.commerce.tools.optools.order.commands
Interface CSROrderPrepareCmd
-
- All Superinterfaces:
- AccCommand, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ControllerCommand, ECCommand, Protectable, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, ToolsControllerCommand
- All Known Implementing Classes:
- CSROrderPrepareCmdImpl
public interface CSROrderPrepareCmd extends ToolsControllerCommand
Calls OrderPrepareCmd to prepare orders on behalf of customer. This command can prepare at most two orders.Behavior
- Checks to see if the orders have any items. Only order with items will be prepared.
- Calls OrderCalculateCmd with forUser parameter set to customerId to calculate any rule-based discount.
- Calls OrderPrepareCmd with forUser parameter set to customerId to prepare customer's orders
- It will only prepare the order if the order has order items.
Parameters
- XML
- An input xml_string that contains the details of the orders which will be prepared.
Example xml_string: <?xml version="1.0" encoding "UTF-8"> <order> <customerId>20000 </customerId> <firstOrder> <id>10001</id> </firstOrder> <secondOrder> <id>10002</id> </secondOrder> </order> </xml>
- URL
- The URL to be called when the command completes successfully.
Response Parameter:
- orderId
- Return the order Id of the order item(s) added to.
Exception Conditions
Throws all exceptions that are thrown byOrderCalculateCmd
andOrderPrepareCmd
.Error View:
- CSROrderPrepareErrorView
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
IBM copyright notice field.static java.lang.String
defaultCommandClassName
The default implementation class.static java.lang.String
NAME
The name of this command.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description java.lang.String
getCustomerId()
Gets the customer ID.java.lang.String
getFirstOrderId()
Gets the first order ID.java.lang.String
getSecondOrderId()
Gets the second order ID.-
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.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, performExecute, 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, getResources, getStoreId, getUser, getUserId, performExecute, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
-
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
-
-
-
-
Field Detail
-
COPYRIGHT
static final java.lang.String COPYRIGHT
IBM copyright notice field.- See Also:
- Constant Field Values
-
NAME
static final java.lang.String NAME
The name of this command.- See Also:
- Constant Field Values
-
defaultCommandClassName
static final java.lang.String defaultCommandClassName
The default implementation class.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCustomerId
java.lang.String getCustomerId()
Gets the customer ID. The customer ID is also appended to success redirect URL.- Returns:
- The customer ID.
-
getFirstOrderId
java.lang.String getFirstOrderId()
Gets the first order ID. The first order ID is also appended to success redirect URL.- Returns:
- The first order ID.
-
getSecondOrderId
java.lang.String getSecondOrderId()
Gets the second order ID. The second order ID is also appended to success redirect URL.- Returns:
- The second order ID.
-
-