com.ibm.commerce.payment.actions.commands

Class TrackPaymentActionsCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, TrackPaymentActionsCmd, 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 TrackPaymentActionsCmdImpl
    extends TaskCommandImpl
    implements TrackPaymentActionsCmd
    This is the default implementation class of the command TrackPaymentActionsCmd. This class:

    If the parameter transactionCompensationAction is configured as 'track', this command is called both during transaction rolling back and rolled back. When transaction rolling back, the command retrieves relative payment data from database for successful payment action and cache them in class variables. The successful payment action refers to the payment action that has been successfully executed within the current transaction. The Payment data may include edpPayInst, edpAtmPay, ppcPayInst, ppcPayment, ppcPayTran, ppcExtData, edpRelease, ppcCredit, edpRefInst. When transaction rolled back, the command restores these cached data back to database.

    out-of-box just provides implementations for some basic data's retrieval and restore logic e.g edpPayInst and does not provide overall implementation. You can extend the methods retrievePaymentData() and restorePaymentData() to give implementation according to your specific usage scenarios and requirements.

    Input parameters include:
  • actionData (setActionData(ActionData actionData)): This parameter is the original action data that has been successfully executed.
See Also:
Serialized Form
    • Field Detail

      • QUERY_ACTION

        public static final java.lang.Short QUERY_ACTION
        action type -- query action
      • RESTORE_ACTION

        public static final java.lang.Short RESTORE_ACTION
        action type -- restore action
    • Constructor Detail

      • TrackPaymentActionsCmdImpl

        public TrackPaymentActionsCmdImpl()
    • Method Detail

      • getEDPReleases

        public java.util.Collection getEDPReleases()
        This method gets edpRelease data.
        Specified by:
        getEDPReleases in interface TrackPaymentActionsCmd
        Returns:
        the edpRelease data.
      • setEDPReleases

        public void setEDPReleases(java.util.Collection localEdpReleases)
        This method sets edpRelease data.
        Specified by:
        setEDPReleases in interface TrackPaymentActionsCmd
        Parameters:
        localEdpReleases - the edpRelease data.
      • getPPCCredit

        public com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData getPPCCredit()
        This method gets ppcCredit data.
        Specified by:
        getPPCCredit in interface TrackPaymentActionsCmd
        Returns:
        the ppcCredit data.
      • setPPCCredit

        public void setPPCCredit(com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData localPpcCredit)
        This method sets ppcCredit data.
        Specified by:
        setPPCCredit in interface TrackPaymentActionsCmd
        Parameters:
        localPpcCredit - the ppcCredit data.
      • getEDPRefInst

        public com.ibm.commerce.edp.refunds.RefundInstructionData getEDPRefInst()
        This method gets edpRefInst data.
        Specified by:
        getEDPRefInst in interface TrackPaymentActionsCmd
        Returns:
        the edpRefInst data.
      • setEDPRefInst

        public void setEDPRefInst(com.ibm.commerce.edp.refunds.RefundInstructionData localEdpRefInst)
        This method sets edpRefInst data.
        Specified by:
        setEDPRefInst in interface TrackPaymentActionsCmd
        Parameters:
        localEdpRefInst - the edpRefInst data.
      • setActionData

        public void setActionData(ActionData localActionData)
        This method sets the action data that has been successfully executed.
        Specified by:
        setActionData in interface TrackPaymentActionsCmd
        Parameters:
        localActionData - the action data that has been successfully executed.
      • getActionType

        public java.lang.Short getActionType()
        This method gets the action type for this command which determines whether to retrieve or restore payment data for the payment action.
        Returns:
        the action type for this command.
      • setActionType

        public void setActionType(java.lang.Short localActionType)
        This method sets the action type for this command which determines whether to retrieve or restore payment data for the payment action.
        Specified by:
        setActionType in interface TrackPaymentActionsCmd
        Parameters:
        localActionType - the action type to set to the command.
      • getActionData

        public ActionData getActionData()
        This method gets the action data that has been successfully executed.
        Returns:
        the action data that has been successfully executed.
      • setOrderId

        public void setOrderId(java.lang.Long localOrderId)
        This method sets orderId data of the payment action.
        Specified by:
        setOrderId in interface TrackPaymentActionsCmd
        Parameters:
        localOrderId - the orderId data of the payment action.
      • getPhase

        public java.lang.Integer getPhase()
        This method gets the phase when the payment action is executed.
        Returns:
        Returns the phase.
      • setPhase

        public void setPhase(java.lang.Integer localPhase)
        This method sets the phase when the payment action is executed.
        Parameters:
        localPhase - The phase to set.
      • getPPCPayInst

        public com.ibm.commerce.payments.plugincontroller.beans.PPCPayInstData getPPCPayInst()
        This method gets ppcPayInst data.
        Specified by:
        getPPCPayInst in interface TrackPaymentActionsCmd
        Returns:
        the ppcPayInst data.
      • setPPCPayInst

        public void setPPCPayInst(com.ibm.commerce.payments.plugincontroller.beans.PPCPayInstData localPpcPayInst)
        This method sets ppcPayInst data.
        Specified by:
        setPPCPayInst in interface TrackPaymentActionsCmd
        Parameters:
        localPpcPayInst - the ppcPayInst data.
      • getPPCPayment

        public com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData getPPCPayment()
        This method gets ppcPayment data.
        Specified by:
        getPPCPayment in interface TrackPaymentActionsCmd
        Returns:
        the ppcPayment data.
      • setPPCPayment

        public void setPPCPayment(com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData localPpcPayment)
        This method sets ppcPayment data.
        Specified by:
        setPPCPayment in interface TrackPaymentActionsCmd
        Parameters:
        localPpcPayment - the ppcPayment data.
      • getPPCPayTran

        public com.ibm.commerce.payments.plugincontroller.beans.PPCPayTranData getPPCPayTran()
        This method gets ppcPayTran data.
        Specified by:
        getPPCPayTran in interface TrackPaymentActionsCmd
        Returns:
        the ppcPayTran data.
      • setPPCPayTran

        public void setPPCPayTran(com.ibm.commerce.payments.plugincontroller.beans.PPCPayTranData localPpcPayTran)
        This method sets ppcPayTran data.
        Specified by:
        setPPCPayTran in interface TrackPaymentActionsCmd
        Parameters:
        localPpcPayTran - the ppcPayTran data.
      • getEDPPayInst

        public com.ibm.commerce.edp.model.PaymentInstructionData getEDPPayInst()
        This method gets edpPayInst data.
        Specified by:
        getEDPPayInst in interface TrackPaymentActionsCmd
        Returns:
        the edpPayInst data.
      • setEDPPayInst

        public void setEDPPayInst(com.ibm.commerce.edp.model.PaymentInstructionData localEdpPayInst)
        This method sets edpPayInst data.
        Specified by:
        setEDPPayInst in interface TrackPaymentActionsCmd
        Parameters:
        localEdpPayInst - the edpPayInst data.
      • getEDPAtmPay

        public com.ibm.commerce.edp.model.AtomicPaymentData getEDPAtmPay()
        This method gets edpAtmPay data.
        Specified by:
        getEDPAtmPay in interface TrackPaymentActionsCmd
        Returns:
        the edpAtmPay data.
      • setEDPAtmPay

        public void setEDPAtmPay(com.ibm.commerce.edp.model.AtomicPaymentData localEdpAtmPay)
        This method sets edpAtmPay data.
        Specified by:
        setEDPAtmPay in interface TrackPaymentActionsCmd
        Parameters:
        localEdpAtmPay - the edpAtmPay data.
      • getPPCExtDataForPayInst

        public java.util.Collection getPPCExtDataForPayInst()
        This method gets ppcExtData for ppcPayInst.
        Specified by:
        getPPCExtDataForPayInst in interface TrackPaymentActionsCmd
        Returns:
        the ppcExtData for ppcPayInst.
      • setPPCExtDataForPayInst

        public void setPPCExtDataForPayInst(java.util.Collection localPPCExtData)
        This method sets ppcExtData for ppcPayInst.
        Specified by:
        setPPCExtDataForPayInst in interface TrackPaymentActionsCmd
        Parameters:
        localPPCExtData - the ppcExtData for ppcPayInst.
      • getPPCExtDataForPayTran

        public java.util.Collection getPPCExtDataForPayTran()
        This method gets ppcExtData for ppcPayTran.
        Specified by:
        getPPCExtDataForPayTran in interface TrackPaymentActionsCmd
        Returns:
        the ppcExtData for ppcPayTran.
      • setPPCExtDataForPayTran

        public void setPPCExtDataForPayTran(java.util.Collection localPPCExtData)
        This method sets ppcExtData for ppcPayTran.
        Specified by:
        setPPCExtDataForPayTran in interface TrackPaymentActionsCmd
        Parameters:
        localPPCExtData - the ppcExtData for ppcPayTran.
      • 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.