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

## rendsite.resources
Class Resources

    java.lang.Object
      rendsite.resources.Resources

    public class Resources

extends java.lang.Object

Resource management.

Author:
  erich Version History

       10NOV09 - EPG - First package release.

Field Summary
`static java.util.Locale` | `GOATLANDIA`
`static java.util.Locale` | `GOATLANDINESE`
`static java.lang.String` | `RESOURCE_MESSAGES`

Constructor Summary
`Resources(java.util.Locale locale)` Construct.

Method Summary
`java.util.ResourceBundle` | `getBundle(java.lang.String resourceName)` Get the named bundle.
`java.util.ResourceBundle` | `getMessagesBundle()` Get the MESSAGES bundle.
`Messaging` | `getMessaging()` Get the messaging convenience.
`static java.lang.String` | `lookup(java.util.ResourceBundle bundle, java.lang.String key)` Do a safe lookup.
`static java.lang.String` | `lookup(java.util.ResourceBundle bundle, java.lang.String key, java.lang.String defaultText)` Do a safe lookup.
`static java.lang.String` | `lookupNumeric(java.util.ResourceBundle bundle, int numeric)` Do a safe lookup of a numeric.
`static java.lang.String` | `lookupNumeric(java.util.ResourceBundle bundle, int numeric, java.lang.String defaultText)` Do a safe lookup of a numeric.

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

Field Detail

### RESOURCE_MESSAGES

    public static final java.lang.String RESOURCE_MESSAGES

See Also:
  Constant Field Values

### GOATLANDINESE

    public static java.util.Locale GOATLANDINESE

### GOATLANDIA

    public static java.util.Locale GOATLANDIA

Constructor Detail

### Resources

    public Resources(java.util.Locale locale)
              throws java.lang.Throwable

  Construct.

  Parameters:
    `locale` - the locale.
  Throws:
    `java.lang.Throwable`

Method Detail

### getMessagesBundle

    public java.util.ResourceBundle getMessagesBundle()
                                               throws java.lang.Throwable

  Get the MESSAGES bundle.

  Returns:
    the resource bundle.
  Throws:
    `java.lang.Throwable`

### getMessaging

    public Messaging getMessaging()
                           throws java.lang.Throwable

  Get the messaging convenience.

  Returns:
    messaging convenience class.
  Throws:
    `java.lang.Throwable`

### getBundle

    public java.util.ResourceBundle getBundle(java.lang.String resourceName)
                                       throws java.lang.Throwable

  Get the named bundle.

  Parameters:
    `resourceName` - the resource name
  Returns:
    the resource bundle
  Throws:
    `java.lang.Throwable`

### lookup

    public static java.lang.String lookup(java.util.ResourceBundle bundle,
                                          java.lang.String key)

  Do a safe lookup. If the key isn't found, return null.

  Parameters:
    `bundle` - the resource bundle.
    `key` - the key
  Returns:
    the value or null

### lookup

    public static java.lang.String lookup(java.util.ResourceBundle bundle,
                                          java.lang.String key,
                                          java.lang.String defaultText)

  Do a safe lookup. If the key isn't found, return the defaultText.

  Parameters:
    `bundle` - the resource bundle.
    `key` - the key
    `defaultText` - the default text
  Returns:
    the value or the default text.

### lookupNumeric

    public static java.lang.String lookupNumeric(java.util.ResourceBundle bundle,
                                                 int numeric)

  Do a safe lookup of a numeric. It will be converted to the 4 digit hexidecimal for a key. This is how the numerics are mapped to messages. If the key isn't found, return null.

  Parameters:
    `bundle` - the resource bundle.
    `numeric` - the numeric key.
  Returns:
    the value or null

### lookupNumeric

    public static java.lang.String lookupNumeric(java.util.ResourceBundle bundle,
                                                 int numeric,
                                                 java.lang.String defaultText)

  Do a safe lookup of a numeric. It will be converted to the 4 digit hexidecimal for a key. This is how the numerics are mapped to messages. If the key isn't found, return defaultText.

  Parameters:
    `bundle` - the resource bundle.
    `numeric` - the numeric key.
    `defaultText` - the default text
  Returns:
    the value or the default text.

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

rendsite.