com.ibm.commerce.order.commands
Class OrderCancelCmdImpl
java.lang.Object
|
+--CacheableCommandImpl
|
+--com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.order.commands.OrderCancelCmdImpl
- All Implemented Interfaces:
-
AccCommand,
ControllerCommand,
ECCommand,
ECTargetableCommand,
OrderCancelCmd
- public class OrderCancelCmdImpl
- extends
ControllerCommandImpl
- implements
OrderCancelCmd
Default implementation of the
OrderCancelCmd
controller command interface.
- See Also:
- Serialized
Form
Method Summary |
java.lang.Long |
getOrderId()
Gets the identifier of the Order to cancel. |
AccessVector |
getResources()
Returns an AccessVector containing the
OrderAccessBean to be canceled. |
java.lang.String |
getUrl()
Gets the redirection URL to be called when the command completes
successfully. |
void |
performExecute()
Executes the main business logic of the command. |
void |
reset()
Resets instance variables to their initial values. |
void |
setOrderId(java.lang.Long anOrderId)
Sets the identifier of the Order to cancel. |
void |
setRequestProperties(
TypedProperty aReqParms)
Sets the request properties. |
void |
setUrl(java.lang.String astrUrl)
Sets the redirection URL to be called when the command completes
successfully. |
void |
validateParameters()
Ensures that the command context contains a Store. |
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.
ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
istrThisClass
protected static java.lang.String istrThisClass
istrIsReadyToCallExecuteFunc
protected static java.lang.String istrIsReadyToCallExecuteFunc
istrSetRequestPropertiesFunc
protected static java.lang.String istrSetRequestPropertiesFunc
protected static java.lang.String istrPerformFunc
istrCheckParametersFunc
protected static java.lang.String istrCheckParametersFunc
OrderCancelCmdImpl
public OrderCancelCmdImpl()
getOrderId
public java.lang.Long getOrderId()
- Gets the identifier of the Order to cancel.
-
- Returns:
- the Order identifier.
getResources
public AccessVector getResources()
throws ECException
- Returns an
AccessVector
containing the
OrderAccessBean
to be canceled.
-
- Specified by:
-
getResources
in interface
ECCommand
- Overrides:
-
getResources
in class
AbstractECTargetableCommand
-
- Returns:
- the
AccessVector
.
- Throws:
-
ECException
- See Also:
-
ECCommand.getResources()
getUrl
public java.lang.String getUrl()
- Gets the redirection URL to be called when the command completes
successfully.
-
- Returns:
- the redirection URL.
public void performExecute()
throws ECException
- Executes the main business logic of the command.
Cancels the specified order by changing its order status to X. This command
does not remove the order from the database. It will not cancel an Order unless
it is for the current user, and has a
status
attribute value of P,
E, W, or X.
Behaviour:
- The Order is unlocked.
- Its
status
attribute value is set to X.
- The
status
attribute values of its OrderItems are set to
X.
- If ATP inventory is enabled, any allocations or backorders are
reversed.
- If the Order is awaiting approval, the outstanding approval flow is
canceled.
- The
viewTaskName
response property is set to the value
"RedirectView"
.
-
- Specified by:
-
performExecute
in interface
ECCommand
- Overrides:
-
performExecute
in class
AbstractECTargetableCommand
-
- Throws:
-
ECException
reset
public void reset()
- Resets instance variables to their initial values.
-
- Overrides:
-
reset
in class
AbstractECTargetableCommand
setOrderId
public void setOrderId(java.lang.Long anOrderId)
- Sets the identifier of the Order to cancel.
-
- Specified by:
-
setOrderId
in interface
OrderCancelCmd
-
- Parameters:
anOrderId
- the Order identifier.
setRequestProperties
public void setRequestProperties(TypedProperty aReqParms)
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:
aReqParms
- request properties
- Throws:
-
ECApplicationException
- The _ERR_BAD_MISSING_CMD_PARAMETER message
is passed, with the name of the invalid or missing property name.
- See Also:
-
ControllerCommand.setRequestProperties(TypedProperty)
setUrl
public void setUrl(java.lang.String astrUrl)
- Sets the redirection URL to be called when the command completes
successfully.
-
- Specified by:
-
setUrl
in interface
OrderCancelCmd
-
- Parameters:
astrUrl
- the redirection URL string.
validateParameters
public void validateParameters()
throws ECException
- Ensures that the command context contains a Store.
-
- Specified by:
-
validateParameters
in interface
ECCommand
- Overrides:
-
validateParameters
in class
AbstractECTargetableCommand
-
- Throws:
-
ECException
- See Also:
-
ECCommand.validateParameters()