com.ibm.commerce.payments.plugin.impl

Class PluginContextImpl

  • java.lang.Object
    • com.ibm.commerce.payments.plugin.impl.PluginContextImpl
  • All Implemented Interfaces:
    PluginContext, java.io.Serializable, java.lang.Cloneable


    public class PluginContextImpl
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Cloneable, PluginContext

    This class is the request context used in financial transactions and queries.

    See Also:
    Plugin, QueryablePlugin, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      PluginContextImpl(PluginConfigurationImpl configurationData, java.util.Locale locale, java.lang.String paymentConfigurationGroupId)
      This method creates a new Plugin context.
      PluginContextImpl(PluginConfigurationImpl configurationData, java.util.Locale locale, java.lang.String paymentConfigurationGroupId, java.lang.String orderChannelId)
      This method creates a new Plugin context.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object clone()
      This method returns a shallow copy of this PluginContextImpl instance.
      PluginConfiguration getConfiguration()
      This method gets the Plugin configuration.
      java.util.Locale getLocale()
      This method gets the locale to be used in the financial transaction or query.
      java.lang.String getOrderChannelId()
      This method gets the channel identifier of the order.
      java.lang.String getPaymentConfigurationGroupId()
      This method gets the configuration group id .
      java.lang.String toString()
      This method obtains a human-readable representation of the PluginContext.
      • Methods inherited from class java.lang.Object

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

      • PluginContextImpl

        public PluginContextImpl(PluginConfigurationImpl configurationData,
                                 java.util.Locale locale,
                                 java.lang.String paymentConfigurationGroupId)

        This method creates a new Plugin context.

        Parameters:
        configurationData - The Plugin configuration coming from the Plugin deployment descriptor.
        locale - The locale to be used in the financial transaction or query.
        paymentConfigurationGroupId - The configuration group id, such as group-101.
      • PluginContextImpl

        public PluginContextImpl(PluginConfigurationImpl configurationData,
                                 java.util.Locale locale,
                                 java.lang.String paymentConfigurationGroupId,
                                 java.lang.String orderChannelId)

        This method creates a new Plugin context.

        Parameters:
        configurationData - The Plugin configuration coming from the Plugin deployment descriptor.
        locale - The locale to be used in the financial transaction or query.
        paymentConfigurationGroupId - The configuration group id, such as group-101.
        orderChannelId - The channel identifier through which the order is placed.
    • Method Detail

      • getLocale

        public java.util.Locale getLocale()

        This method gets the locale to be used in the financial transaction or query.

        Specified by:
        getLocale in interface PluginContext
        Returns:
        The locale to be used in the financial transaction or query.
      • getPaymentConfigurationGroupId

        public java.lang.String getPaymentConfigurationGroupId()
        This method gets the configuration group id .
        Specified by:
        getPaymentConfigurationGroupId in interface PluginContext
        Returns:
        The configuration group id .
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException

        This method returns a shallow copy of this PluginContextImpl instance.

        Overrides:
        clone in class java.lang.Object
        Returns:
        A shallow copy of this PluginContextImpl instance.
        Throws:
        java.lang.CloneNotSupportedException - If the instance cannot be cloned.
      • toString

        public java.lang.String toString()

        This method obtains a human-readable representation of the PluginContext.

        Specified by:
        toString in interface PluginContext
        Overrides:
        toString in class java.lang.Object
        Returns:
        A human-readable representation of the PluginContext.
      • getOrderChannelId

        public java.lang.String getOrderChannelId()

        This method gets the channel identifier of the order.

        Specified by:
        getOrderChannelId in interface PluginContext
        Returns:
        The channel identifier for the order.