com.ibm.commerce.payment.beans

Class PaymentPolicyListDataBean

  • All Implemented Interfaces:
    DataBean, InputDataBean, SmartDataBean, com.ibm.commerce.payment.beans.PaymentPolicyListInputDataBean, com.ibm.commerce.payment.beans.PaymentPolicyListSmartDataBean, java.io.Serializable


    public class PaymentPolicyListDataBean
    extends SmartDataBeanImpl
    implements com.ibm.commerce.payment.beans.PaymentPolicyListInputDataBean, com.ibm.commerce.payment.beans.PaymentPolicyListSmartDataBean
    This DataBean, when populated, gives a list of PaymentPolicyInfo beans representing Payment Business Policies that the Store supports.

    See Also:
    PaymentPolicyInfo, Serialized Form
    • Field Detail

      • POLICY_NAME_CREDIT_LINE

        public static final java.lang.String POLICY_NAME_CREDIT_LINE
        The name of the Credit Line payment business policy in WebSphere Commerce v5.x
        See Also:
        Constant Field Values
      • POLICY_NAME_LINEOFCREDIT

        public static final java.lang.String POLICY_NAME_LINEOFCREDIT
        The name of the Credit Line payment business policy
        See Also:
        Constant Field Values
      • POLICY_NAME_VOID_CHECKOUT

        public static final java.lang.String POLICY_NAME_VOID_CHECKOUT
        The name of the Void Checkout payment business policy
        See Also:
        Constant Field Values
      • CURRENCY_CODE_UNKNOWN

        public static final java.lang.String CURRENCY_CODE_UNKNOWN
        The special currency code used if the numeric currency code does not have a corresponding alpha code in the SETCURR Table. The numeric currency code is used by WebSphere Commerce Payments
        See Also:
        Constant Field Values
    • Constructor Detail

      • PaymentPolicyListDataBean

        public PaymentPolicyListDataBean()
        PaymentPolicyListDataBean default constructor.
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Returns the message property of the Bean. The message property stores any message received during population of the Bean. It may be the empty String if no message has been received.

        This is mainly for diagnostics purposes.

        Specified by:
        getMessage in interface com.ibm.commerce.payment.beans.PaymentPolicyListSmartDataBean
        Returns:
        any String message received during population of the DataBean or the empty String if no message has been received.
      • getNonPMPaymentPolicyInfo

        public PaymentPolicyInfo[] getNonPMPaymentPolicyInfo()
        Returns an array of PaymentPolicyInfo for the Store representing the set of non-cassette based Payment Policies configured and usable by the Store.

        This method returns a zero-length array if there is no non-cassette based Payment Policy that is usable by the Store.

        Specified by:
        getNonPMPaymentPolicyInfo in interface com.ibm.commerce.payment.beans.PaymentPolicyListSmartDataBean
        Returns:
        an array of PaymentPolicyInfo
        See Also:
        PaymentPolicyInfo
      • getAllNonPMPaymentPolicyInfo

        public PaymentPolicyInfo[] getAllNonPMPaymentPolicyInfo()
        Returns an array of PaymentPolicyInfo for the Store representing the set of non-cassette based Payment Policies configured and usable by the Store. This includes policies with duplicated policyName.

        This method returns a zero-length array if there is no non-cassette based Payment Policy that is usable by the Store.

        Returns:
        an array of PaymentPolicyInfo
        See Also:
        PaymentPolicyInfo
      • getPaymentPolicyInfoUsableWithoutTA

        public PaymentPolicyInfo[] getPaymentPolicyInfoUsableWithoutTA(java.lang.String astrCurrency)
        Returns an array of PaymentPolicyInfo representing Payment Policies usable by the specified Store. The specified currency is intended to filter out Payment Policies that are known to not support certain currency. It is NOT a guarantee that Payment Policies returned will definitely support the specified currency.
        Specified by:
        getPaymentPolicyInfoUsableWithoutTA in interface com.ibm.commerce.payment.beans.PaymentPolicyListSmartDataBean
        Parameters:
        astrCurrency - the String representing the currency that the Payment Policy needs to support.
        Returns:
        an array of PaymentPolicyInfo bean.
      • getPaymentSystemException

        public java.lang.Exception getPaymentSystemException()
        Returns any Exception thrown by the Payment System during the population of the List DataBean or null.

        When an empty list of PaymentTCInfo bean is returned by the getPaymentTCInfo() method. This is useful for diagnostics or for determining whether to display a user-friendly message to the customer.

        One possible Exception returned is the com.ibm.etill.framework.clientapi.PaymentServerCommunicationException which indicates a failure to communicate with WebSphere Commerce Payments.

        Specified by:
        getPaymentSystemException in interface com.ibm.commerce.payment.beans.PaymentPolicyListSmartDataBean
        Returns:
        the Exception object thrown by the Payment System or null if none was thrown.
      • getPMPaymentPolicyInfo

        public PaymentPolicyInfo[] getPMPaymentPolicyInfo()
        Returns an array of PaymentPolicyInfo for the Store representing the set of cassette-based Payment Policies configured and usable by the Store.

        This method returns a zero-length array if there is no configured Payment Policy usable by the Store. Or if there is a problem obtaining the information from WebSphere Commerce Payments.

        Specified by:
        getPMPaymentPolicyInfo in interface com.ibm.commerce.payment.beans.PaymentPolicyListSmartDataBean
        Returns:
        an array of PaymentPolicyInfo
        See Also:
        PaymentPolicyInfo
      • getPrimaryRC

        public int getPrimaryRC()
        Returns the primary return code as returned from the WebSphere Commerce Payments QueryAccounts command.

        This is mainly for diagnostics purposes.

        Specified by:
        getPrimaryRC in interface com.ibm.commerce.payment.beans.PaymentPolicyListSmartDataBean
        Returns:
        the primary return code from the WebSphere Commerce Payments QueryAccounts command or -1 if an error occurred before the QueryAccounts command was issued.
      • getSecondaryRC

        public int getSecondaryRC()
        Returns the secondary return code as returned from the WebSphere Commerce Payments QueryAccounts command.

        This is mainly for diagnostics purposes.

        Specified by:
        getSecondaryRC in interface com.ibm.commerce.payment.beans.PaymentPolicyListSmartDataBean
        Returns:
        the secondary return code from the WebSphere Commerce Payments QueryAccounts command or -1 if an error occurred before the QueryAccounts command was issued.
      • populate

        public void populate()
                      throws java.lang.Exception
        Populate the Bean Properties. This method is called by the DataBeanManager during DataBean activation.
        Specified by:
        populate in interface SmartDataBean
        Overrides:
        populate in class SmartDataBeanImpl
        Throws:
        Exception.
        java.lang.Exception - This method should never be thrown because there is no data retrieved to populate the data bean.
      • setPolicyName

        public void setPolicyName(java.lang.String aPolicyName)
        Optionally specify the name of the payment policy you wish to request for information. If no name is specified, information on all payment policies for which the Store is configured will be retrieved.
        Specified by:
        setPolicyName in interface com.ibm.commerce.payment.beans.PaymentPolicyListInputDataBean
        Parameters:
        aPolicyName - the name of the payment policy.
      • setStoreId

        public void setStoreId(java.lang.Integer aStoreId)
        Sets the Store ID for which the list of usable Payment Policies are requested.
        Specified by:
        setStoreId in interface com.ibm.commerce.payment.beans.PaymentPolicyListInputDataBean
        Parameters:
        aStoreId - the Store ID.
      • getPaymentPolicyInfoUsableWithoutTA

        public PaymentPolicyInfo[] getPaymentPolicyInfoUsableWithoutTA()
        Returns an array of PaymentPolicyInfo representing Payment Policies usable by the specified Store. The command context currency is used to filter out Payment Policies that are known to not support certain currency. It is NOT a guarantee that Payment Policies returned will definitely support the command context currency.
        Returns:
        an array of PaymentPolicyInfo bean.
      • setFindCreditLinePolicy

        public void setFindCreditLinePolicy(boolean b)
        Sets if we should only return the credit line business policy
        Parameters:
        b -
      • isCreditPaymentPolicy

        public static boolean isCreditPaymentPolicy(java.lang.String policyName)
        Returns if the policy name is a Credit Line policy
        Parameters:
        policyName - the name of the payment business policy
        Returns:
        true if the policy is a credit line policy, false otherwise