com.ibm.commerce.payment.rules

Class EDPResults

  • java.lang.Object
    • com.ibm.commerce.payment.rules.EDPResults
  • All Implemented Interfaces:
    java.io.Serializable


    public class EDPResults
    extends java.lang.Object
    implements java.io.Serializable
    The overall results associated to each EDP operation.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String STATUS_FAILURE
      Request has failed.
      static int STATUS_FAILURE_INT
      Request has failed.
      static java.lang.String STATUS_PENDING
      Request has finalized but at least one payment action returned a pending status.
      static int STATUS_PENDING_INT
      Request has finalized but at least one payment action returned a pending status.
      static java.lang.String STATUS_SUCCESS
      Request has been successfully completed.
      static int STATUS_SUCCESS_INT
      Request has been successfully completed.
      static java.lang.String STATUS_TIMEOUT
      Request has finalized with a timeout.
      static int STATUS_TIMEOUT_INT
      Request has finalized with a timeout.
      static java.lang.String STATUS_UNKNOWN
      Initial status.
      static int STATUS_UNKNOWN_INT
      Initial status Integer representation.
    • Constructor Summary

      Constructors 
      Constructor and Description
      EDPResults(int localOverallStatus, java.util.Map localActionResults)
      This method creates a new EDPResults object.
      EDPResults(int localOverallStatus, java.util.Map localActionResults, java.util.Map localPiFailures)
      This method creates a new EDPResults object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addActionResults(java.lang.String name, ActionResults results)
      This method adds the results from a new action to the operation results.
      void addPiFailure(java.lang.String failId, BaseException piException)
      This method adds results from a new action to the operation results.
      ActionResults getActionResults(java.lang.String name)
      This method returns the results of payment/refund action.
      java.util.Map getActionResultsMap()
      This method returns the map of payment/refund actions and the corresponding results.
      EDPException getEdpException()
      This method returns a Payment Rules exception, if any, that occurred during the processing of the Payment Rules operation.
      java.util.Map getFailedActionResults()
      This method returns the list of actions that failed in the Payment Rules operation.
      int getOverallStatus()
      This method returns the overallStatus .
      java.lang.String getOverallStatusAsString()
      This method returns the overall status in a readable format.
      BaseException getPiFailure(java.lang.String piId)
      This method returns the exception of payment instruction failure.
      java.util.Map getPiFailuresMap()
      This method returns the map of payment instruction and failure results.
      int getProcessStatus()
      This method returns the process status of the Payment Rules operation.
      java.lang.String getProcessStatusAsString()
      This method returns the process status as a human-readable string.
      boolean isAttentionRequired()
      This method sets if the human attention required.
      void setAttentionRequired(boolean b)
      This method sets if the human attention required.
      void setEdpException(EDPException exception)
      This method sets a Payment Rules exception, if any, that occurred during the processing of the Payment Rules operation.
      void setOverallStatus(int status)
      This method sets the overallStatus .
      void setProcessStatus(int i)
      This method sets the process status.
      java.lang.String toString()
      This method returns a readable form of the EDPResults object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • STATUS_UNKNOWN

        public static final java.lang.String STATUS_UNKNOWN
        Initial status. Not meant to be globalized . This is for tracing/debug purposes.
        See Also:
        Constant Field Values
      • STATUS_UNKNOWN_INT

        public static final int STATUS_UNKNOWN_INT
        Initial status Integer representation.
        See Also:
        Constant Field Values
      • STATUS_SUCCESS

        public static final java.lang.String STATUS_SUCCESS
        Request has been successfully completed. All payment actions (if any) have succeeded. Not meant to be globalized . This is for tracing/debug purposes.
        See Also:
        Constant Field Values
      • STATUS_SUCCESS_INT

        public static final int STATUS_SUCCESS_INT
        Request has been successfully completed. Integer representation.
        See Also:
        Constant Field Values
      • STATUS_PENDING

        public static final java.lang.String STATUS_PENDING
        Request has finalized but at least one payment action returned a pending status. Not meant to be globalized . This is for tracing/debug purposes.
        See Also:
        Constant Field Values
      • STATUS_PENDING_INT

        public static final int STATUS_PENDING_INT
        Request has finalized but at least one payment action returned a pending status. Internal code.
        See Also:
        Constant Field Values
      • STATUS_FAILURE

        public static final java.lang.String STATUS_FAILURE
        Request has failed. At least one payment action has failed. Not meant to be globalized . This is for tracing/debug purposes.
        See Also:
        Constant Field Values
      • STATUS_FAILURE_INT

        public static final int STATUS_FAILURE_INT
        Request has failed. At least one payment action has failed. Integer representation.
        See Also:
        Constant Field Values
      • STATUS_TIMEOUT

        public static final java.lang.String STATUS_TIMEOUT
        Request has finalized with a timeout. No payment actions failed. Some payment actions might have finished successfully. Not meant to be globalized . This is for tracing/debug purposes.
        See Also:
        Constant Field Values
      • STATUS_TIMEOUT_INT

        public static final int STATUS_TIMEOUT_INT
        Request has finalized with a timeout. No payment actions failed. Some payment actions might have finished successfully. Integer representation.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EDPResults

        public EDPResults(int localOverallStatus,
                          java.util.Map localActionResults)
        This method creates a new EDPResults object.
        Parameters:
        localOverallStatus - The overall status of the Payment Rules operation
        localActionResults - The list of actions executed in the Payment Rules operation and their results
      • EDPResults

        public EDPResults(int localOverallStatus,
                          java.util.Map localActionResults,
                          java.util.Map localPiFailures)
        This method creates a new EDPResults object.
        Parameters:
        localOverallStatus - The overall status of the Payment Rules operation
        localActionResults - The list of actions executed in the Payment Rules operation and their results
        localPiFailures - The list of payment instructions that failed (threw an Exception)during this Payment Rules operation
    • Method Detail

      • setEdpException

        public final void setEdpException(EDPException exception)
        This method sets a Payment Rules exception, if any, that occurred during the processing of the Payment Rules operation.
        Parameters:
        exception - The exception that happened during the processing of the Payment Rules operation
      • getEdpException

        public final EDPException getEdpException()
        This method returns a Payment Rules exception, if any, that occurred during the processing of the Payment Rules operation.
        Returns:
        successfully The exception associated with the calling Payment Rules operation (may be null)
      • getActionResults

        public ActionResults getActionResults(java.lang.String name)
        This method returns the results of payment/refund action.
        Parameters:
        name - The action name
        Returns:
        The results of payment/refund action
      • getActionResultsMap

        public java.util.Map getActionResultsMap()
        This method returns the map of payment/refund actions and the corresponding results.
        Returns:
        actionResults The map of payment/refund actions and the corresponding results
      • setAttentionRequired

        public void setAttentionRequired(boolean b)
        This method sets if the human attention required.
        Parameters:
        b - If the human attention required
      • isAttentionRequired

        public boolean isAttentionRequired()
        This method sets if the human attention required.
        Returns:
        attentionRequired If the human attention required
      • getFailedActionResults

        public java.util.Map getFailedActionResults()
        This method returns the list of actions that failed in the Payment Rules operation.
        Returns:
        The list of failed actions
      • setOverallStatus

        public void setOverallStatus(int status)
        This method sets the overallStatus .
        Parameters:
        status - The overall status of the Payment Rules operation
      • getOverallStatus

        public int getOverallStatus()
        This method returns the overallStatus .
        Returns:
        The overall status of the Payment Rules operation
      • getOverallStatusAsString

        public java.lang.String getOverallStatusAsString()
        This method returns the overall status in a readable format.
        Returns:
        The overall status of the Payment Rules converted to a readable string
      • getPiFailure

        public BaseException getPiFailure(java.lang.String piId)
        This method returns the exception of payment instruction failure.
        Parameters:
        piId - A String of the payment instruction ID
        Returns:
        BaseException The exception of payment instruction failure
      • getPiFailuresMap

        public java.util.Map getPiFailuresMap()
        This method returns the map of payment instruction and failure results.
        Returns:
        Map
      • setProcessStatus

        public void setProcessStatus(int i)
        This method sets the process status.
        Parameters:
        i - The process status of the Payment Rules operation.
      • getProcessStatus

        public int getProcessStatus()
        This method returns the process status of the Payment Rules operation.
        Returns:
        processStatus The process status of the Payment Rules operation
      • getProcessStatusAsString

        public java.lang.String getProcessStatusAsString()
        This method returns the process status as a human-readable string.
        Returns:
        The process status as a human-readable string
      • addActionResults

        public void addActionResults(java.lang.String name,
                                     ActionResults results)
        This method adds the results from a new action to the operation results.
        Parameters:
        name - The name of the action
        results - The action results to add
      • addPiFailure

        public void addPiFailure(java.lang.String failId,
                                 BaseException piException)
        This method adds results from a new action to the operation results.
        Parameters:
        failId - The name of the action
        piException - The exception thrown by the failing PI
      • toString

        public java.lang.String toString()

        This method returns a readable form of the EDPResults object.

        Warning: not localized, for debugging purposes only!
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string format of the EDPStatus object.