com.ibm.commerce.order.commands
Class OrderCancelCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.order.commands.OrderCancelCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderCancelCmd, Protectable
- public class OrderCancelCmdImpl
- extends ControllerCommandImpl
- implements OrderCancelCmd
Cancels the specified order by changing its order status to X. This command does
not remove the order from the database. An order can be cancelled any time before
the OrderProcess command begins running.
Method Summary |
java.lang.Long |
getOrderId()
Gets the id of the order to cancel. |
AccessVector |
getResources()
Gets the access vector accessed by this command. |
java.lang.String |
getUrl()
Gets the redirection url to be called when the command completes successfully. |
void |
performExecute()
Contains the actual business logic of the command
It should be implemented by all the command writer. |
void |
reset()
This method should be called after a command has been executed to reset its states variables. |
void |
setOrderId(java.lang.Long anOrderId)
Sets the id of the order to cancel. |
void |
setRequestProperties(TypedProperty aReqParms)
The WebController calls this method before invoking the execute method in this command to
set the request properties for this command. |
void |
setUrl(java.lang.String astrUrl)
Sets the redirection url to be called when the command completes successfully. |
void |
validateParameters()
Performs server side parameter checking. |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, 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, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
istrCheckParametersFunc
protected static java.lang.String istrCheckParametersFunc
istrIsReadyToCallExecuteFunc
protected static java.lang.String istrIsReadyToCallExecuteFunc
istrPerformFunc
protected static java.lang.String istrPerformFunc
istrSetRequestPropertiesFunc
protected static java.lang.String istrSetRequestPropertiesFunc
istrThisClass
protected static java.lang.String istrThisClass
OrderCancelCmdImpl
public OrderCancelCmdImpl()
getOrderId
public java.lang.Long getOrderId()
- Gets the id of the order to cancel.
getResources
public AccessVector getResources()
throws ECException
- Description copied from interface:
ECCommand
- Gets the access vector accessed by this command.
The default implementation returns null indicating that no protectable resource is
accessed by this command. It is the responsibilities of the command writer to
return the protectable primary resource(s) and the corresponding actions accessed
by this command.
- Specified by:
getResources
in interface ECCommand
- Overrides:
getResources
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Returns:
- AccessVector - a vector of resource action pairs
getUrl
public java.lang.String getUrl()
- Gets the redirection url to be called when the command completes successfully.
performExecute
public void performExecute()
throws ECException
- Description copied from interface:
ECCommand
- Contains the actual business logic of the command
It should be implemented by all the command writer.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.
reset
public void reset()
- Description copied from class:
AbstractECTargetableCommand
- This method should be called after a command has been executed to reset its states variables.
After the call to reset, we should be able to execute the command again.
- Overrides:
reset
in class AbstractECTargetableCommand
setOrderId
public void setOrderId(java.lang.Long anOrderId)
- Sets the id of the order to cancel.
- Specified by:
setOrderId
in interface OrderCancelCmd
- Parameters:
OrderId
- java.util.Integer - order identifier
setRequestProperties
public void setRequestProperties(TypedProperty aReqParms)
throws ECApplicationException
- Description copied from interface:
ControllerCommand
- 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
- Following copied from interface:
com.ibm.commerce.command.ControllerCommand
- Parameters:
requestProperties
- com.ibm.commerce.datatype.TypedProperty- Throws:
com.ibm.commerce.exception.ECException.
-
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
- java.lang.String - redirection url string
validateParameters
public void validateParameters()
throws ECException
- Description copied from interface:
ECCommand
- Performs server side parameter checking. This method replaces the checkParameters() method in a previous
version of the code.
- Specified by:
validateParameters
in interface ECCommand
- Overrides:
validateParameters
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
ECException.
-