com.ibm.jarm.api.util

Class RMLString

  • java.lang.Object
    • com.ibm.jarm.api.util.RMLString


  • public class RMLString
    extends java.lang.Object
    For internal use only. Class used to retrieve localized strings that are used within JARM (as opposed to those used for exception and logging messages). Many of these are used to generate strings associated with RMAudit Event entries. NOTE: Strings are always fetched from the appropriate per-locale resource file based upon the Locale.getDefault() value.
    • Constructor Summary

      Constructors 
      Constructor and Description
      RMLString() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static java.lang.String format(java.lang.String key, java.lang.Object... args)
      Uses java.text.MessageFormat to generate a formatted String based upon the localized pattern String defined by the key parameter.
      static java.lang.String format(java.lang.String key, java.lang.String defaultPattern, java.lang.Object... args)
      Uses java.text.MessageFormat to generate a formatted String based upon the localized pattern String defined by the key parameter.
      static java.lang.String get(java.lang.String key)
      Retrieves the localized string defined by the key parameter using the Locale.getDefault() value.
      static java.lang.String get(java.lang.String key, java.lang.String defaultValue)
      Retrieves the localized string defined by the key parameter using the Locale.getDefault() value.
      • Methods inherited from class java.lang.Object

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

      • RMLString

        public RMLString()
    • Method Detail

      • get

        public static java.lang.String get(java.lang.String key)
        Retrieves the localized string defined by the key parameter using the Locale.getDefault() value.
        Parameters:
        key - String key for use with .properties file.
        Returns:
        The appropriate localized String if available. Returns null if no such String resource is available.
      • get

        public static java.lang.String get(java.lang.String key,
                           java.lang.String defaultValue)
        Retrieves the localized string defined by the key parameter using the Locale.getDefault() value. Returns given defaultValue String parameter value if no resource String is available.
        Parameters:
        key - String key for use with .properties file.
        defaultValue - Fall back String value to return if no resource String is available. This entry can be null.
        Returns:
        The appropriate localized String if available. Returns defaultValue if no such String resource is available.
      • format

        public static java.lang.String format(java.lang.String key,
                              java.lang.Object... args)
        Uses java.text.MessageFormat to generate a formatted String based upon the localized pattern String defined by the key parameter.
        Parameters:
        key - String key for use with .properties file.
        args - Variable # of Object arguments to be formated and substituted.
        Returns:
        The resulting formatted String.
      • format

        public static java.lang.String format(java.lang.String key,
                              java.lang.String defaultPattern,
                              java.lang.Object... args)
        Uses java.text.MessageFormat to generate a formatted String based upon the localized pattern String defined by the key parameter. If no such pattern is available, the defaultPattern parameter is used instead.
        Parameters:
        key - String key for use with .properties file.
        defaultPattern - Fallback pattern String.
        args - Variable # of Object arguments to be formated and substituted.
        Returns:
        The resulting formatted String.

© Copyright IBM Corp. 2010, 2013. All Rights Reserved.