Class MessageFormatter

java.lang.Object
com.netscape.certsrv.base.MessageFormatter

public class MessageFormatter extends Object
Factors out common function of formatting internatinalized messages taking arguments and using java.util.ResourceBundle and java.text.MessageFormat mechanism.

Version:
$Revision$, $Date$
See Also:
  • Constructor Details

    • MessageFormatter

      public MessageFormatter()
  • Method Details

    • getLocalizedString

      public static String getLocalizedString(Locale locale, String resourceBundleBaseName, String formatString)
      Retrieves the localized string.
      Parameters:
      locale - end user locale
      resourceBundleBaseName - resource bundle class name
      formatString - format string
      Returns:
      localized string
    • getLocalizedString

      public static String getLocalizedString(Locale locale, String resourceBundleBaseName, String formatString, Object params)
      Retrieves the localized string.
      Parameters:
      locale - end user locale
      resourceBundleBaseName - resource bundle class name
      formatString - format string
      params - parameters to be substituted
      Returns:
      localized string
    • getLocalizedString

      public static String getLocalizedString(Locale locale, String resourceBundleBaseName, String formatString, Object[] params)
      Retrieves the localized string.
      Parameters:
      locale - end user locale
      resourceBundleBaseName - resource bundle class name
      formatString - format string
      params - parameters to be substituted
      Returns:
      localized string