com.ibm.commerce.payment.actions.commands

Class UndoPaymentActionsCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, UndoPaymentActionsCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class UndoPaymentActionsCmdImpl
    extends TaskCommandImpl
    implements UndoPaymentActionsCmd
    This is the default implementation class of the command 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.
See Also:
Serialized Form
    • Constructor Detail

      • UndoPaymentActionsCmdImpl

        public UndoPaymentActionsCmdImpl()
    • Method Detail

      • setOriginalActionData

        public void setOriginalActionData(ActionData localOriginalActionData)
        This method sets the original action data that has been successfully executed.
        Specified by:
        setOriginalActionData in interface UndoPaymentActionsCmd
        Parameters:
        localOriginalActionData - the original action data that has been successfully executed
      • getOriginalActionData

        public ActionData getOriginalActionData()
        This method returns the original action data that has been successfully executed.
        Returns:
        the original action data that has been successfully executed
      • isTicklerNeeded

        public boolean isTicklerNeeded()
        This method returns whether a tickler is necessary when the undo payment action is not successfully executed.
        Specified by:
        isTicklerNeeded in interface UndoPaymentActionsCmd
        Returns:
        whether a tickler is necessary when the undo payment action is not successfully executed
      • setTicklerNeeded

        public void setTicklerNeeded(boolean localTicklerNeeded)
        This method sets whether a tickler is necessary when the undo payment action is not successfully executed.
        Parameters:
        localTicklerNeeded - whether a tickler is necessary when the undo payment action is not successfully executed
      • getTicklerComments

        public java.lang.String getTicklerComments()
        This method returns the comments of the tickler.
        Specified by:
        getTicklerComments in interface UndoPaymentActionsCmd
        Returns:
        the comments of the tickler
      • setTicklerComments

        public void setTicklerComments(java.lang.String localTicklerComments)
        This method sets the comments of the tickler.
        Parameters:
        localTicklerComments - the comments of the tickler
      • reset

        public void reset()

        This method resets the command fields.

        After this method is invoked, and proper attributes are set, the command can be executed again.

        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        This method is called by the Command Framework to check if all basic mandatory parameters have been set for this command. This is done before the Framework calls the performExecute method of the command.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        A boolean that is true if the command is ready to execute and false otherwise.