org.norther.tammi.root.locale
Class PersistentResourceBundle

java.lang.Object
  extended by java.util.ResourceBundle
      extended by org.norther.tammi.core.locale.LookupResourceBundle
          extended by org.norther.tammi.core.locale.PluggableResourceBundle
              extended by org.norther.tammi.root.locale.PersistentResourceBundle
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Dictionary, SampleResourceBundle

public abstract class PersistentResourceBundle
extends PluggableResourceBundle

An abstract extension to PluggableResourceBundle maintaining its resources in a persistent repository. Subclasses may extend this class directly to provide a single shared persistent resource bundle accessed via SampleResourceBundle, or they can extend themselves SampleResourceBundle to support several class specific resource bundles.

Version:
$Id: PersistentResourceBundle.java,v 1.29 2009/09/28 15:08:35 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.ResourceBundle
ResourceBundle.Control
 
Field Summary
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
PersistentResourceBundle()
          Constructs a new resource bundle.
 
Method Summary
 Enumeration<String> getKeys()
          Implementation of the ResourceBundle.getKeys method.
protected  SampleResourceBundle getSampleResourceBundle()
          Gets a sample resource bundle.
protected  Object handleGetObject(String key)
          Implementation of the ResourceBundle.handleGetObject method.
 String lookupKey(Object resource)
          Looks up for a resource key.
protected  void plugIn(String name, MBeanReference<? extends ResourceFinder> instance)
          Plugs in to the referenced resource finder.
 
Methods inherited from class org.norther.tammi.core.locale.PluggableResourceBundle
getMBeanServer, getPlugInKey, getResourceCheckInterval, getResourceFinderMBean, release
 
Methods inherited from class org.norther.tammi.core.locale.LookupResourceBundle
getBaseName, getKeys, getParent, lookup, lookup, lookupObject, lookupString, lookupStringArray, setBaseName
 
Methods inherited from class java.util.ResourceBundle
clearCache, clearCache, containsKey, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, handleKeySet, keySet, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentResourceBundle

public PersistentResourceBundle()
Constructs a new resource bundle.

Method Detail

getKeys

public Enumeration<String> getKeys()
Description copied from class: LookupResourceBundle
Implementation of the ResourceBundle.getKeys method.

Overrides:
getKeys in class LookupResourceBundle
Returns:
an enumeration of keys.

lookupKey

public String lookupKey(Object resource)
Description copied from class: LookupResourceBundle
Looks up for a resource key.

Overrides:
lookupKey in class LookupResourceBundle
Parameters:
resource - the resource.
Returns:
the found key or null.

handleGetObject

protected Object handleGetObject(String key)
Description copied from class: LookupResourceBundle
Implementation of the ResourceBundle.handleGetObject method.

Overrides:
handleGetObject in class LookupResourceBundle
Parameters:
key - the key of the object to get.
Returns:
the object value.

plugIn

protected void plugIn(String name,
                      MBeanReference<? extends ResourceFinder> instance)
Description copied from class: PluggableResourceBundle
Plugs in to the referenced resource finder.

Overrides:
plugIn in class PluggableResourceBundle
Parameters:
name - the base name of this resource bundle.
instance - the resource finder.

getSampleResourceBundle

protected SampleResourceBundle getSampleResourceBundle()
Gets a sample resource bundle.

Returns:
the sample resource bundle.


Copyright © 2004 The Norther Organization. All rights reserved.