com.ibm.commerce.edp.resourcebundle

Class EDPMessages

  • java.lang.Object
    • com.ibm.commerce.edp.resourcebundle.EDPMessages


  • public class EDPMessages
    extends java.lang.Object
    This utility is used to retrieve the translated message from resource bundles.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String getMessage(java.util.List resourceBundleNames, java.lang.String messageKey, java.lang.Object[] parameters, java.util.Locale locale, java.lang.String defaultMessage)
      This method returns a translated message from any resource bundle in a list.
      static java.lang.String getMessage(java.lang.String messageKey)
      This method returns the message from the Payment Rules resource bundle using the default JVM locale.
      static java.lang.String getMessage(java.lang.String messageKey, java.lang.Object[] parameters)
      This method returns the message from the Payment Rules resource bundle using the default JVM locale.
      static java.lang.String getMessage(java.lang.String messageKey, java.lang.Object[] parameters, java.util.Locale locale, java.lang.String defaultMessage)
      This method returns the message from the Payment Rules resource bundle using the specified locale.
      static java.lang.String getMessage(java.lang.String messageKey, java.lang.String parameter, java.util.Locale locale, java.lang.String defaultMessage)
      This method returns the Message from the resource bundle for the locale
      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 returns 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 returns the Message from the 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

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        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.lang.String defaultMessage)

        This method returns 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:
        String the translated message
      • 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 returns 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; if null, default locale is used
        defaultMessage - if the translated message not found from the resource bundle, this message will be used; if this is null, it will return the message key
        Returns:
        the translated message; if not available the default message; if not available either the messageKey
      • getMessage

        public static java.lang.String getMessage(java.util.List resourceBundleNames,
                                                  java.lang.String messageKey,
                                                  java.lang.Object[] parameters,
                                                  java.util.Locale locale,
                                                  java.lang.String defaultMessage)
        This method returns a translated message from any resource bundle in a list.
        Parameters:
        resourceBundleNames - the list of resource bundle names
        messageKey - The key to retrieve the translated message
        parameters - The parameters to format the message
        locale - the locale to translate the message; if null, default locale is used
        defaultMessage - if the translated message not found from the resource bundle, this message will be used; if this is null, it will return the message key
        Returns:
        the translated message; if not available the default message; if not available either the messageKey
      • getMessage

        public static java.lang.String getMessage(java.lang.String messageKey,
                                                  java.lang.Object[] parameters)
        This method returns the message from the Payment Rules resource bundle using the default JVM locale.
        Parameters:
        messageKey - the key to be used to retrieve the translated message
        parameters - the parameters to format the message
        Returns:
        String the translated message
      • getMessage

        public static java.lang.String getMessage(java.lang.String messageKey)
        This method returns the message from the Payment Rules resource bundle using the default JVM locale.
        Parameters:
        messageKey - the key to be used to retrieve the translated message
        Returns:
        the translated message if possible, otherwise the messageKey
      • getMessage

        public static java.lang.String getMessage(java.lang.String messageKey,
                                                  java.lang.Object[] parameters,
                                                  java.util.Locale locale,
                                                  java.lang.String defaultMessage)
        This method returns the message from the Payment Rules resource bundle using the specified locale.
        Parameters:
        messageKey - the key to be used to retrieve the translated message
        parameters - the parameters to format the message
        locale - the locale to be used 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 messageKey,
                                                  java.lang.String parameter,
                                                  java.util.Locale locale,
                                                  java.lang.String defaultMessage)
        This method returns the Message from the resource bundle for the locale
        Parameters:
        messageKey - the key to be used to retrieve the translated message
        parameter - the resource bundle name to look the message in
        locale - the locale to be used 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.