at.gv.egovernment.moa.util
Class ResourceBundleChain

java.lang.Object
  |
  +--at.gv.egovernment.moa.util.ResourceBundleChain

public class ResourceBundleChain
extends Object

A class to chain ResourceBundles.

Version:
$Id$
Author:
Patrick Peck

Constructor Summary
ResourceBundleChain()
           
 
Method Summary
 void addResourceBundle(ResourceBundle resourceBundle)
          Add a ResourceBundle to the chain.
 String getString(String key)
          Return the value of the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBundleChain

public ResourceBundleChain()
Method Detail

addResourceBundle

public void addResourceBundle(ResourceBundle resourceBundle)
Add a ResourceBundle to the chain.
Parameters:
resourceBundle - The ResourceBundle to add.

getString

public String getString(String key)
                 throws MissingResourceException
Return the value of the resource.
Parameters:
key - The key to access the String resource.
Returns:
The resource value. All the registered ResourceBundles are searched in the order in which they have previously been added to this ResourceBundleChain.
Throws:
MissingResourceException - The resource coult not be found in any of the bundles.