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

## com.bea.wlpi.client.common
Class Resources

    java.lang.Object
      |
      +--com.bea.wlpi.client.common.Resources

public class Resources
extends java.lang.Object

Manages localized resources used by WebLogic Process Integrator client classes. This static class locates and caches ResourceBundles (including a default bundle used by all classes in this package). The class provides methods to retrieve localized strings, characters and parameterized messages from either the default bundle or one named by the caller. The latter facility is for use by other client packages. The locale is a global (i.e., static) attribute, initially set to the system default. The locale may be set programmatically by calling the static method `setLocale(java.util.Locale)`. The default resource bundle is backed by the properties file `com/bea/wlpi/client/common/text/Text.properties` or a localized version thereof (e.g. `~/Text_en_US.properties`).

Author:
  Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.

Constructor Summary
`Resources()`

Method Summary
`static char` | `getChar(java.lang.String key)` Get a localized character from the default resource bundle.
`static char` | `getChar(java.lang.String key, java.lang.String bundle)` Get a localized character from the named resource bundle.
`static java.util.Locale` | `getLocale()` Return the current locale.
`static java.lang.String` | `getString(java.lang.String key)` Get a localized string from the default resource bundle.
`static java.lang.String` | `getString(java.lang.String key, java.lang.Object[] args)` Get a localized message from the default resource bundle, formatted with the supplied arguments.
`static java.lang.String` | `getString(java.lang.String key, java.lang.Object[] args, java.lang.String bundle)` Get a localized message from the named resource bundle, formatted with the supplied arguments.
`static java.lang.String` | `getString(java.lang.String key, java.lang.String bundle)` Get a localized string from the named resource bundle.
`static void` | `setLocale(java.util.Locale locale)` Set the locale.

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

Constructor Detail

### Resources

    public Resources()

Method Detail

### setLocale

    public static void setLocale(java.util.Locale locale)

  Set the locale.

  Parameters:
    `locale` - The locale to set.

### getLocale

    public static java.util.Locale getLocale()

  Return the current locale.

  Returns:
    The current locale (set initially to the system locale).

### getChar

    public static char getChar(java.lang.String key)

  Get a localized character from the default resource bundle.

  Parameters:
    `key` - The resource key.
  Returns:
    A localized character matching the specified key.

### getString

    public static java.lang.String getString(java.lang.String key)

  Get a localized string from the default resource bundle.

  Parameters:
    `key` - The resource key.
  Returns:
    A localized resource string matching the specified key.

### getString

    public static java.lang.String getString(java.lang.String key,
                                             java.lang.Object[] args)

  Get a localized message from the default resource bundle, formatted with the supplied arguments.

  Parameters:
    `key` - The resource key.
    `args` - Arguments to be inserted into the message text.
  Returns:
    A localized, formatted message string matching the specified key.

### getChar

    public static char getChar(java.lang.String key,
                               java.lang.String bundle)

  Get a localized character from the named resource bundle.

  Parameters:
    `key` - The resource key.
  Returns:
    A localized resource character matching the specified key.

### getString

    public static java.lang.String getString(java.lang.String key,
                                             java.lang.String bundle)

  Get a localized string from the named resource bundle.

  Parameters:
    `key` - The resource key.
  Returns:
    A localized resource string matching the specified key.

### getString

    public static java.lang.String getString(java.lang.String key,
                                             java.lang.Object[] args,
                                             java.lang.String bundle)

  Get a localized message from the named resource bundle, formatted with the supplied arguments.

  Parameters:
    `key` - The resource key.
    `args` - Arguments to be inserted into the message text.
  Returns:
    A localized, formatted message string matching the specified key.

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

WebLogic Integration (WLI)