com.ibm.commerce.payment.beans

Class UsablePaymentTCListDataBean

  • All Implemented Interfaces:
    DataBean, InputDataBean, SmartDataBean, com.ibm.commerce.payment.beans.UsablePaymentTCListInputDataBean, com.ibm.commerce.payment.beans.UsablePaymentTCListSmartDataBean, Delegator, java.io.Serializable


    public class UsablePaymentTCListDataBean
    extends SmartDataBeanImpl
    implements com.ibm.commerce.payment.beans.UsablePaymentTCListInputDataBean, com.ibm.commerce.payment.beans.UsablePaymentTCListSmartDataBean, Delegator
    This DataBean, when populated, gives a list of PaymentTCInfo bean. They represent Payment Terms and Conditions that could be used to pay for the order specified as input parameter before the DataBean is activated.

    See Also:
    PaymentTCInfo, Serialized Form
    • Constructor Detail

      • UsablePaymentTCListDataBean

        public UsablePaymentTCListDataBean()
        UsablePaymentTCListDataBean default constructor.
    • Method Detail

      • getDelegate

        public Protectable getDelegate()
                                throws java.lang.Exception
        Retrieves its delegate. This method is called by the Access Control Framework.

        For the UsablePaymentTCListDataBean, the getDelegate() method returns the OrderDataBean specified by the order ID. The OrderDataBean object is the Protectable object whose access control policies will indirectly control the access control for this object

        Specified by:
        getDelegate in interface Delegator
        Returns:
        the OrderDataBean object representing the order
        Throws:
        java.lang.Exception
      • 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.UsablePaymentTCListSmartDataBean
        Returns:
        the String message received during population of the DataBean
      • getPaymentSystemException

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

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

        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.UsablePaymentTCListSmartDataBean
        Returns:
        the Exception object thrown by the Payment System or null if none was thrown during the activation of the DataBean.
      • getPaymentTCInfo

        public PaymentTCInfo[] getPaymentTCInfo()
        Returns an array of PaymentTCInfo bean representing payment terms and conditions that could be used to pay for the specified Order.
        Specified by:
        getPaymentTCInfo in interface com.ibm.commerce.payment.beans.UsablePaymentTCListSmartDataBean
        Returns:
        an array of PaymentTCInfo bean.
        See Also:
        PaymentTCInfo
      • getFilteredPaymentTCInfo

        public PaymentTCInfo[] getFilteredPaymentTCInfo()
        Returns a filtered array of PaymentTCInfo bean representing payment terms and conditions that could be used to pay for the specified Order. This method will filter out all the incompatible payment Term & Conditions. If compatibleMode is set through setCompatibleMode(), only the payment Term & Conditions with the required compatible mode is returned. If the order has the payment instructions and the compatible mode of the payment instruction is true, no payment Term & Condition is returned. If the compatible mode of the payment instructions are false, only the payment Term & Condition with compatible mode false is returned.
        Returns:
        an array of PaymentTCInfo bean.
        See Also:
        PaymentTCInfo
      • 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.UsablePaymentTCListSmartDataBean
        Returns:
        the primary return code from the QueryAccounts command or -1 if an error occurred before the 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.UsablePaymentTCListSmartDataBean
        Returns:
        the secondary return code from the QueryAccounts command or -1 if an error occurred before the 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.
      • setOrderId

        public void setOrderId(java.lang.Long aOrderId)
        Sets the orderId property of the Bean. The orderId is the reference number of the customer order.
        Specified by:
        setOrderId in interface com.ibm.commerce.payment.beans.UsablePaymentTCListInputDataBean
        Parameters:
        aOrderId - the ID of the customer order.
      • setCompatibleMode

        public void setCompatibleMode(java.lang.String compatibleMode)
        Sets the compatible mode of the payment policy.
        Parameters:
        compatibleMode - the ID of the customer order.
      • setReturnAllUsableTC

        public void setReturnAllUsableTC(boolean returnAllUsableTC)
        This method sets the flag that indicating whether to return all the usable payment policies when there are multiple payment policies with the same name. If this flag is false(default value), then if there are multiple payment policies with the same name, the policies with the same names will be overridden by the following priority: Policies of the current store have highest priority. Policies of the other stores in the store path have higher priority. Policies of the site level have the lowest priority. If this flag is true, then it will return all the usable TCs without overriding even when there are multiple payment policies with the same name.
        Specified by:
        setReturnAllUsableTC in interface com.ibm.commerce.payment.beans.UsablePaymentTCListInputDataBean
        Parameters:
        returnAllUsableTC -