Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.lang
Class Resources

    java.lang.Object
      org.jasig.portal.lang.Resources

    public final class Resources

extends java.lang.Object

The `Resources` class defines a set of utility methods which translate an internationalized string to a localized string. The transformation is done with the use of standard `java.util.ResourceBundle` and `java.text.MessageFormat` classes.

Version:
  $Revision: 1.3.4.1 $ $Date: 2005/08/05 18:39:23 $
Author:
  Jan Nielsen

Constructor Summary
`private` | `Resources()` Private constructor.

Method Summary
`static java.lang.String` | `getString(java.lang.Class client, java.lang.String name)` Returns the localized value of the specified string resource.
`static java.lang.String` | `getString(java.lang.Class client, java.lang.String name, java.lang.String[] objects)` Returns the localized value of the specified string resource.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Resources

    private Resources()

  Private constructor.

Method Detail

### getString

    public static final java.lang.String getString(java.lang.Class client,
                                                   java.lang.String name)

  Returns the localized value of the specified string resource. The string resource is resolved by using the client parameter to lookup the associated `ResourceBundle` object and returning the string value associated with the specified name.

  Parameters:
    `client` - class to use to find the resource bundle
    `name` - name of the string resource
  Returns:
    value of the string resource
  Throws:
    `java.lang.NullPointerException` - if client or name is `null`
    `java.util.MissingResourceException` - if the resource name is not found

### getString

    public static final java.lang.String getString(java.lang.Class client,
                                                   java.lang.String name,
                                                   java.lang.String[] objects)

  Returns the localized value of the specified string resource. The string resource is resolved by using the client parameter to lookup the associated `ResourceBundle` object and returning the string value associated with the specified name. The `MessageFormat` class is used to format the localized string using the specified runtime parameters.

  Parameters:
    `client` - class to use to find the resource bundle
    `name` - name of the string resource
    `objects` - runtime objects to be inserted into resource
  Returns:
    value of the string resource
  Throws:
    `java.lang.NullPointerException` - if client or name is `null`
    `java.util.MissingResourceException` - if the resource name is not found

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD