public class AdminOrderCancelCmdImpl extends OrderBaseCmdImpl implements AdminOrderCancelCmd
AdminOrderCancelCmd
controller command used to cancel order.
Name | Description |
---|---|
orderId |
The order Id abbreviations. Optional |
URL |
The redirect URL. Optional |
notifyMerchant |
The property indicates whether to notify merchant for order cancel. If the value is 1, the command will notify merchant. Otherwise, the command will not notify merchant when the value equals 0. Optional |
notifyShopper |
The property indicates whether to notify shopper for order cancel. If the value is 1, the command will notify shopper. Otherwise, the command will not notify shopper when the value equals 0. Optional |
forcedCancel |
The property indicates whether to reverse payment when the deposit has already happened. If the value is true, the command will reverse all approved payment even if deposits have already happened. Optional |
CancelOrderCmd
to cancel payment.RemoveJobCmd
to remove scheduled order.DoInventoryActionCmd
to reverse inventory.BusinessFlowEvent
to raise the business flow event.CancelPONumberCmd
to cancel purchase order number.notifyMerchant
equals 1, it notifies merchant for order cancel.notifyShopper
equals 1, it notifies shopper for order cancel.RaiseOrderEventCmd
to raise business event.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The full name of this command.
|
defaultCommandClassName, ERR_CODE_MISSING_PARAM, ERR_CODE_WRONG_ORDER_STATE, ERRTASK_NAME, NAME
Constructor and Description |
---|
AdminOrderCancelCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
getForcedCancel()
This method gets the forcedCancel
|
java.lang.Long |
getOrderId()
This method returns the id of the order.
|
AccessVector |
getResources()
This method gets the resources.
|
java.lang.String |
getURL()
This method returns the URL .
|
boolean |
isReadyToCallExecute()
This method is called by the Command Framework to check if
URL and
orderId parameters have been set for this command. |
void |
performExecute()
This method executes the business logic of this command implementation.
|
static void |
performOrderCancel(CommandContext cmdCtxt,
OrderAccessBean abOrder,
java.lang.Boolean forcedCancel,
TypedProperty requestProperties)
This static method performs an order cancel.
|
static void |
performOrderCancel(CommandContext cmdCtxt,
OrderAccessBean abOrder,
java.lang.String sPurge,
TypedProperty requestProperties)
This static method calls
performOrderCancel(CommandContext, OrderAccessBean, Boolean, TypedProperty) to cancel order. |
static void |
performOrderCancel(CommandContext cmdCtxt,
OrderAccessBean abOrder,
TypedProperty requestProperties)
This static method calls
performOrderCancel(CommandContext, OrderAccessBean, Boolean, TypedProperty) to cancel order. |
void |
setForcedCancel(java.lang.Boolean cancel)
This method sets the forcedCancel
|
void |
setOrderId(java.lang.Long orderId)
This method sets the id of the order.
|
void |
setRequestProperties(TypedProperty reqProperties)
This method sets request properties, if the parameter is null or unexpected value, the method will give it default value.
|
void |
setURL(java.lang.String astrURL)
This method sets the redirect URL property of the command.
|
static void |
throwIllegalStatus(java.lang.String methodName)
This method reports and propagates error for invalid status.
|
void |
validateParameters()
This method checks parameters of the command.
|
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
fulfills, getOwner
public static final java.lang.String CLASSNAME
public java.lang.Long getOrderId()
public AccessVector getResources() throws ECException
getResources
in interface ECCommand
getResources
in class AbstractECTargetableCommand
ECException
public java.lang.String getURL()
public boolean isReadyToCallExecute()
URL
and
orderId
parameters have been set for this command.
This is done before the Framework calls the performExecute method of the command.isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
public static void performOrderCancel(CommandContext cmdCtxt, OrderAccessBean abOrder, TypedProperty requestProperties) throws ECException, java.sql.SQLException
performOrderCancel(CommandContext, OrderAccessBean, Boolean, TypedProperty)
to cancel order.cmdCtxt
- a command context.abOrder
- an order access bean.requestProperties
- a request property.ECException
java.sql.SQLException
public static void performOrderCancel(CommandContext cmdCtxt, OrderAccessBean abOrder, java.lang.String sPurge, TypedProperty requestProperties) throws ECException, java.sql.SQLException
performOrderCancel(CommandContext, OrderAccessBean, Boolean, TypedProperty)
to cancel order.cmdCtxt
- a command context.abOrder
- an order access bean.sPurge
- the purge property of the command.requestProperties
- a request property.ECException
java.sql.SQLException
public static void performOrderCancel(CommandContext cmdCtxt, OrderAccessBean abOrder, java.lang.Boolean forcedCancel, TypedProperty requestProperties) throws ECException, java.sql.SQLException
CancelOrderCmd
to reverse payment, RemoveJobCmd
to remove scheduled order, DoInventoryActionCmd
to reverse inventory, and BusinessFlowEvent
to raise business flow event.cmdCtxt
- a command context.abOrder
- an order access bean.forcedCancel
- a flag of forced cancel(if the flag is true, the command will reverse all approved deposit even if the deposits have already happened)requestProperties
- a request property.ECException
java.sql.SQLException
public void setOrderId(java.lang.Long orderId)
orderId
- order id.public void setRequestProperties(TypedProperty reqProperties) throws ECException
setRequestProperties
in interface ControllerCommand
setRequestProperties
in class ControllerCommandImpl
reqProperties
- a request property.ECApplicationException.
ECException
public void setURL(java.lang.String astrURL)
astrURL
- the URL to redirect to after the command completes its
processing. The payment information is to be appended to this
URL as additional name-value pairs in the query string.public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException
public static void throwIllegalStatus(java.lang.String methodName) throws ECApplicationException
methodName
- a method name.ECApplicationException
public void setForcedCancel(java.lang.Boolean cancel)
cancel
- a flag for Event-Driven Payments cancel, false as the default.public java.lang.Boolean getForcedCancel()