com.ibm.commerce.payments.plugin

Class PluginMessages

  • java.lang.Object
    • com.ibm.commerce.payments.plugin.PluginMessages


  • public class PluginMessages
    extends java.lang.Object

    This class defines standard translated messages and the utility to retrieve them.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String getMessage(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] parameters, java.util.Locale locale, java.lang.String defaultMessage)
      This method gets a translated message from any resource bundle.
      static java.lang.String getMessage(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] parameters, java.lang.String defaultMessage)
      This method gets the Message from the resource bundle for the JVM default locale.
      static java.lang.String getStandardMessage(java.lang.String messageKey, java.lang.Object[] parameters, java.util.Locale locale, java.lang.String defaultMessage)
      This method gets a translated message from the default resource bundle.
      static java.lang.String getStandardMessage(java.lang.String messageKey, java.lang.Object[] parameters, java.lang.String defaultMessage)
      This method gets a translated message from the default resource bundle for the JVM default locale.
      • Methods inherited from class java.lang.Object

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

      • PLUGIN_PARAM_NULL

        public static final java.lang.String PLUGIN_PARAM_NULL
        The key to indicate the parameter is null.
        See Also:
        Constant Field Values
      • PLUGIN_PARAM_INVALID

        public static final java.lang.String PLUGIN_PARAM_INVALID
        The key to indicate the parameter is invalid.
        See Also:
        Constant Field Values
      • PLUGIN_PARAM_LENGTH_BELOW_MIN_LENGTH

        public static final java.lang.String PLUGIN_PARAM_LENGTH_BELOW_MIN_LENGTH
        The key to indicate the parameter length is below the minium length.
        See Also:
        Constant Field Values
      • PLUGIN_PARAM_LENGTH_ABOVE_MAX_LENGTH

        public static final java.lang.String PLUGIN_PARAM_LENGTH_ABOVE_MAX_LENGTH
        The key to indicate the parameter length is above the maximum length.
        See Also:
        Constant Field Values
      • PLUGIN_PARAM_MISSING

        public static final java.lang.String PLUGIN_PARAM_MISSING
        The key to indicate the parameter is missing.
        See Also:
        Constant Field Values
      • PLUGIN_INTERNAL_ERROR

        public static final java.lang.String PLUGIN_INTERNAL_ERROR
        The key to indicate an internal plug-in internal error.
        See Also:
        Constant Field Values
      • PLUGIN_INVALID_STATE

        public static final java.lang.String PLUGIN_INVALID_STATE
        The key to indicate the an incorrect state was used.
        See Also:
        Constant Field Values
      • PLUGIN_INVALID_TRAN_TYPE

        public static final java.lang.String PLUGIN_INVALID_TRAN_TYPE
        The key to indicate the a transaction type was used.
        See Also:
        Constant Field Values
      • PLUGIN_CONFIGURATION_PARAM_NULL

        public static final java.lang.String PLUGIN_CONFIGURATION_PARAM_NULL
        The key to indicate the parameter in plug-in configuration data is null.
        See Also:
        Constant Field Values
      • PLUGIN_CONFIGURATION_PARAM_INVALID

        public static final java.lang.String PLUGIN_CONFIGURATION_PARAM_INVALID
        The key to indicate the parameter in the plug-in configuration data is invalid.
        See Also:
        Constant Field Values
      • PLUGIN_COMMUNICATION_AUTHORIZATION_FAILED

        public static final java.lang.String PLUGIN_COMMUNICATION_AUTHORIZATION_FAILED
        The key to indicate the authorization of the backend failed during communication.
        See Also:
        Constant Field Values
      • PLUGIN_FUNCTION_NOT_SUPPORTED

        public static final java.lang.String PLUGIN_FUNCTION_NOT_SUPPORTED
        The key to indicate the plug-in does not support this function.
        See Also:
        Constant Field Values
      • PLUGIN_PAYMENT_APPROVAL_EXPIRED

        public static final java.lang.String PLUGIN_PAYMENT_APPROVAL_EXPIRED
        The key to indicate the plug-in detected that a payment approval (authorization) has expired.
        See Also:
        Constant Field Values
      • PLUGIN_COMMUNICATION_FAILED

        public static final java.lang.String PLUGIN_COMMUNICATION_FAILED
        The key to indicate communication with the back-end system failed.
        See Also:
        Constant Field Values
      • PLUGIN_COMMUNICATION_TIMEOUT

        public static final java.lang.String PLUGIN_COMMUNICATION_TIMEOUT
        The key to indicate the communication with the backend is timeout.
        See Also:
        Constant Field Values
      • PLUGIN_UNKNOWN_HOST

        public static final java.lang.String PLUGIN_UNKNOWN_HOST
        The key to indicate the unknown host error.
        See Also:
        Constant Field Values
      • PLUGIN_AUTHORIZATION_FAILED

        public static final java.lang.String PLUGIN_AUTHORIZATION_FAILED
        The key to indicate the authorization failed error.
        See Also:
        Constant Field Values
      • PLUGIN_RESOURCEBUNDLE_NOT_FOUND

        public static final java.lang.String PLUGIN_RESOURCEBUNDLE_NOT_FOUND
        The key to indicate that the plugin resource bundle can not be loaded.
        See Also:
        Constant Field Values
      • PLUGIN_RESOURCE_BUNDLE_NAME

        public static final java.lang.String PLUGIN_RESOURCE_BUNDLE_NAME
        The name of the standard plug-in resource bundle .
        See Also:
        Constant Field Values
      • PLUGIN_INVALID_ISO_4712_NUMERIC_CURRENCY_CODE

        public static final java.lang.String PLUGIN_INVALID_ISO_4712_NUMERIC_CURRENCY_CODE
        The message key for invalid ISO 4712 numeric currency code.
        See Also:
        Constant Field Values
      • PLUGIN_INVALID_ISO_4712_ALPHA_CURRENCY_CODE

        public static final java.lang.String PLUGIN_INVALID_ISO_4712_ALPHA_CURRENCY_CODE
        The message key for invalid ISO 4712 alpha currency code.
        See Also:
        Constant Field Values
    • Method Detail

      • getMessage

        public static java.lang.String getMessage(java.lang.String resourceBundleName,
                                                  java.lang.String messageKey,
                                                  java.lang.Object[] parameters,
                                                  java.util.Locale locale,
                                                  java.lang.String defaultMessage)
        This method gets a translated message from any resource bundle.
        Parameters:
        resourceBundleName - The resource bundle name.
        messageKey - The key to retrieve the translated message.
        parameters - The parameters to format the message.
        locale - The locale to translate the message.
        defaultMessage - If the translated message not found from the resource bundle, this message will be used.
        Returns:
        The translated message; if not available, the default message; if no default message is specified, the messageKey.
      • getMessage

        public static java.lang.String getMessage(java.lang.String resourceBundleName,
                                                  java.lang.String messageKey,
                                                  java.lang.Object[] parameters,
                                                  java.lang.String defaultMessage)

        This method gets the Message from the resource bundle for the JVM default locale.

        Parameters:
        resourceBundleName - The resource bundle name.
        messageKey - The key to retrieve the translated message.
        parameters - The parameters to format the message.
        defaultMessage - If the translated message not found from the resource bundle, this message will be used.
        Returns:
        The translated message; if not available, the default message; if no default message is specified, the messageKey.
      • getStandardMessage

        public static java.lang.String getStandardMessage(java.lang.String messageKey,
                                                          java.lang.Object[] parameters,
                                                          java.util.Locale locale,
                                                          java.lang.String defaultMessage)
        This method gets a translated message from the default resource bundle.
        Parameters:
        messageKey - The key to retrieve the translated message.
        parameters - The message parameters.
        locale - The locale to translate the message.
        defaultMessage - If the translated message not found from the resource bundle, this message will be used.
        Returns:
        The translated message; if not available, the default message; if no default message is specified, the messageKey.
      • getStandardMessage

        public static java.lang.String getStandardMessage(java.lang.String messageKey,
                                                          java.lang.Object[] parameters,
                                                          java.lang.String defaultMessage)
        This method gets a translated message from the default resource bundle for the JVM default locale.
        Parameters:
        messageKey - The key to retrieve the translated message.
        parameters - The message parameters.
        defaultMessage - If the translated message not found from the resource bundle, this message will be used.
        Returns:
        The translated message; if not available, the default message; if no default message is specified, the messageKey.