org.norther.tammi.root.locale
Class PersistentResourceBundle
java.lang.Object
java.util.ResourceBundle
org.norther.tammi.core.locale.LookupResourceBundle
org.norther.tammi.core.locale.PluggableResourceBundle
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
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 |
PersistentResourceBundle
public PersistentResourceBundle()
- Constructs a new resource bundle.
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.