com.sun.genericra.util
Class StringManagerBase

java.lang.Object
  extended by com.sun.genericra.util.StringManagerBase
Direct Known Subclasses:
StringManager

public class StringManagerBase
extends java.lang.Object

Implementation of a local string manager. Provides access to i18n messages for classes that need them.


Method Summary
 java.lang.String getString(java.lang.String key)
          Returns a localized string.
 java.lang.String getString(java.lang.String key, java.lang.Object arg1)
          Returns a local string for the caller and format the arguments accordingly.
 java.lang.String getString(java.lang.String key, java.lang.Object[] args)
          Returns a local string for the caller and format the arguments accordingly.
 java.lang.String getString(java.lang.String key, java.lang.Object arg1, java.lang.Object arg2)
          Returns a local string for the caller and format the arguments accordingly.
 java.lang.String getString(java.lang.String key, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Returns a local string for the caller and format the arguments accordingly.
 java.lang.String getString(java.lang.String key, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
          Returns a local string for the caller and format the arguments accordingly.
static StringManagerBase getStringManager(java.lang.String resourceBundleName)
          Returns a local string manager for the given resourceBundle name.
 java.lang.String getStringWithDefault(java.lang.String key, java.lang.String defaultValue)
          Returns a localized string.
 java.lang.String getStringWithDefault(java.lang.String key, java.lang.String defaultFormat, java.lang.Object[] arguments)
          Returns a local string for the caller and format the arguments accordingly.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStringManager

public static StringManagerBase getStringManager(java.lang.String resourceBundleName)
Returns a local string manager for the given resourceBundle name.

Parameters:
resourceBundleName - name of the resource bundle
Returns:
a local string manager for the given package name

getString

public java.lang.String getString(java.lang.String key)
Returns a localized string.

Parameters:
key - the name of the resource to fetch
Returns:
the localized string

getStringWithDefault

public java.lang.String getStringWithDefault(java.lang.String key,
                                             java.lang.String defaultValue)
Returns a localized string. If the key is not found, it will return the default given value.

Parameters:
key - the name of the resource to fetch
defaultValue - the default return value if not found
Returns:
the localized string

getStringWithDefault

public java.lang.String getStringWithDefault(java.lang.String key,
                                             java.lang.String defaultFormat,
                                             java.lang.Object[] arguments)
Returns a local string for the caller and format the arguments accordingly. If the key is not found, it will use the given default format.

Parameters:
key - the key to the local format string
defaultFormat - the default format if not found in the resources
arguments - the set of arguments to provide to the formatter
Returns:
a formatted localized string

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.Object arg1)
Returns a local string for the caller and format the arguments accordingly.

Parameters:
key - the key to the local format string
arg1 - the one argument to be provided to the formatter
Returns:
a formatted localized string

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.Object arg1,
                                  java.lang.Object arg2)
Returns a local string for the caller and format the arguments accordingly.

Parameters:
key - the key to the local format string
arg1 - first argument to be provided to the formatter
arg2 - second argument to be provided to the formatter
Returns:
a formatted localized string

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.Object arg1,
                                  java.lang.Object arg2,
                                  java.lang.Object arg3)
Returns a local string for the caller and format the arguments accordingly.

Parameters:
key - the key to the local format string
arg1 - first argument to be provided to the formatter
arg2 - second argument to be provided to the formatter
arg3 - third argument to be provided to the formatter
Returns:
a formatted localized string

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.Object arg1,
                                  java.lang.Object arg2,
                                  java.lang.Object arg3,
                                  java.lang.Object arg4)
Returns a local string for the caller and format the arguments accordingly.

Parameters:
key - the key to the local format string
arg1 - first argument to be provided to the formatter
arg2 - second argument to be provided to the formatter
arg3 - third argument to be provided to the formatter
arg4 - fourth argument to be provided to the formatter
Returns:
a formatted localized string

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.Object[] args)
Returns a local string for the caller and format the arguments accordingly.

Parameters:
key - the key to the local format string
args - the array of arguments to be provided to the formatter
Returns:
a formatted localized string