public class UndoPaymentActionsCmdImpl extends TaskCommandImpl implements UndoPaymentActionsCmd
UndoPaymentActionsCmd
. This class:
1. If the original action data is for the approval payment, then the ReverseApprove
action is executed.
And if the ReverseApprove
action keeps pending or fails, there will be a tickler.
2. If the original action data is for other types of payment, then only a tickler is created. But it leaves you an extension point. And you can customize the corresponding method to handle the compensated payment action for these payment actions, respectively. Input parameters include:
originalActionData (setOriginalActionData(ActionData actionData)
): This parameter is the original action data that has been successfully executed.
defaultCommandClassName, NAME
Constructor and Description |
---|
UndoPaymentActionsCmdImpl() |
Modifier and Type | Method and Description |
---|---|
ActionData |
getOriginalActionData()
This method returns the original action data that has been successfully executed.
|
java.lang.String |
getTicklerComments()
This method returns the comments of the tickler.
|
boolean |
isReadyToCallExecute()
This method is called by the Command Framework to check if all basic mandatory parameters
have been set for this command.
|
boolean |
isTicklerNeeded()
This method returns whether a tickler is necessary when the undo payment
action is not successfully executed.
|
void |
performExecute()
This method executes the main logic of this command.
|
void |
reset()
This method resets the command fields.
|
void |
setOriginalActionData(ActionData localOriginalActionData)
This method sets the original action data that has been successfully executed.
|
void |
setTicklerComments(java.lang.String localTicklerComments)
This method sets the comments of the tickler.
|
void |
setTicklerNeeded(boolean localTicklerNeeded)
This method sets whether a tickler is necessary when the undo payment
action is not successfully executed.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
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
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
public void setOriginalActionData(ActionData localOriginalActionData)
setOriginalActionData
in interface UndoPaymentActionsCmd
localOriginalActionData
- the original action data that has been successfully executedpublic ActionData getOriginalActionData()
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- in case of any WebSphere Commerce related failurepublic boolean isTicklerNeeded()
isTicklerNeeded
in interface UndoPaymentActionsCmd
public void setTicklerNeeded(boolean localTicklerNeeded)
localTicklerNeeded
- whether a tickler is necessary when the undo payment action is
not successfully executedpublic java.lang.String getTicklerComments()
getTicklerComments
in interface UndoPaymentActionsCmd
public void setTicklerComments(java.lang.String localTicklerComments)
localTicklerComments
- the comments of the ticklerpublic void reset()
This method resets the command fields.
After this method is invoked, and proper attributes are set, the command can be executed again.
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand
public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand