TPTP 4.4.0 Testing Tools Project
Public API Specification

org.eclipse.hyades.test.core.util
Class ResourceBundleManager

java.lang.Object
  extended byorg.eclipse.hyades.test.core.util.ResourceBundleManager

Deprecated. As of TPTP V4.4, use the plug-in's resource bundle (e.g. TestCorePluginResourceBundle for this plug-in) for resolving resources.

public class ResourceBundleManager
extends java.lang.Object

This class provides a mechanism to allow the reuse of instances of ResourceBundle.

The getString(String) and getString(String, String[]) methods return the value associated to a given key by looking for it in a list of resource bundles that are added to this managers through the add methods.

Since:
0.0.1

Constructor Summary
ResourceBundleManager()
          Deprecated. Constructor for ResourceBundleManager
 
Method Summary
 boolean add(int index, java.util.ResourceBundle resourceBundle)
          Deprecated. Adds a resource bundle to a given index of this manager's list.
 boolean add(java.util.ResourceBundle resourceBundle)
          Deprecated. Adds a resource bundle to the end of this manager's list.
 boolean add(java.util.ResourceBundle[] bundles)
          Deprecated. Adds a list of resource bundle to the end of this manager's list.
 void clear()
          Deprecated. Removes all the resource bundles from this manager's list.
protected  java.util.List createResourceBundleList()
          Deprecated. Returns the list that stores the resource bundle.
 void dispose()
          Deprecated.  
 java.lang.String getString(java.lang.String key)
          Deprecated. Returns the string value associate to a given key.
 java.lang.String getString(java.lang.String key, java.lang.String arg)
          Deprecated. Returns the string value associate to a given key.
 java.lang.String getString(java.lang.String key, java.lang.String[] args)
          Deprecated. Returns the string value associate to a given key.
 java.util.Iterator iterator()
          Deprecated. Returns the iterator of the resource bundles in this manager's list.
 java.util.ResourceBundle remove(int resourceBundleIndex)
          Deprecated. Removes a resource bundle located in a specific index of this manager's list.
 boolean remove(java.util.ResourceBundle resourceBundle)
          Deprecated. Removes a resource bundle from this manager's list.
 int size()
          Deprecated. Returns the number of resource bundles added in this manager's list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBundleManager

public ResourceBundleManager()
Deprecated. 
Constructor for ResourceBundleManager

Method Detail

dispose

public void dispose()
Deprecated. 
See Also:
IDisposable.dispose()

createResourceBundleList

protected java.util.List createResourceBundleList()
Deprecated. 
Returns the list that stores the resource bundle. Clients may overwrite.

Returns:
List

add

public boolean add(java.util.ResourceBundle resourceBundle)
Deprecated. 
Adds a resource bundle to the end of this manager's list.

Parameters:
resourceBundle -
Returns:
true if the resource bundle was added or false otherwise.

add

public boolean add(java.util.ResourceBundle[] bundles)
Deprecated. 
Adds a list of resource bundle to the end of this manager's list.

Parameters:
bundles -
Returns:
true if the resource bundle was added or false otherwise.

add

public boolean add(int index,
                   java.util.ResourceBundle resourceBundle)
Deprecated. 
Adds a resource bundle to a given index of this manager's list.

Parameters:
index -
resourceBundle -
Returns:
true if the resource bundle was added or false otherwise.
Throws:
java.lang.IllegalArgumentException - if some aspect of the specified element prevents it from being added to this list.
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index > size()).

remove

public boolean remove(java.util.ResourceBundle resourceBundle)
Deprecated. 
Removes a resource bundle from this manager's list.

Parameters:
resourceBundle -
Returns:
true if the resource bundle was added or false otherwise.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).

remove

public java.util.ResourceBundle remove(int resourceBundleIndex)
Deprecated. 
Removes a resource bundle located in a specific index of this manager's list.

Parameters:
resourceBundleIndex -
Returns:
the element previously at the specified position.

clear

public void clear()
Deprecated. 
Removes all the resource bundles from this manager's list.


iterator

public java.util.Iterator iterator()
Deprecated. 
Returns the iterator of the resource bundles in this manager's list.

Returns:
Iterator

size

public int size()
Deprecated. 
Returns the number of resource bundles added in this manager's list.

Returns:
int

getString

public java.lang.String getString(java.lang.String key)
                           throws java.lang.NullPointerException,
                                  java.util.MissingResourceException
Deprecated. 
Returns the string value associate to a given key. The key is passed to each resource bundle in the order they are retrieve by the iterator() method.

Parameters:
key -
Returns:
String
Throws:
java.util.MissingResourceException - if the key is not in the file
java.lang.NullPointerException - if key is null

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.String arg)
                           throws java.lang.NullPointerException,
                                  java.util.MissingResourceException
Deprecated. 
Returns the string value associate to a given key. The key is passed to each resource bundle in the order they are retrieve by the iterator() method.

The arg string defined replaces the %1 variable defined in the file's values.

Example: If the value associated to the key "a" is "%0 %1 %2 %3 %4" and arg is "v1", the return of this method is "%0 v1 %2 %3 %4".

Parameters:
key -
arg -
Returns:
String
Throws:
java.util.MissingResourceException - if the key is not in the file
java.lang.NullPointerException - if key is null

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.String[] args)
                           throws java.lang.NullPointerException,
                                  java.util.MissingResourceException
Deprecated. 
Returns the string value associate to a given key. The key is passed to each resource bundle in the order they are retrieve by the iterator() method.

The strings defined in args replaces the %n (where n>=1) variables defined in the file's values.

Example: If the value associated to the key "a" is "%0 %1 %2 %3 %4" and args is {"v1", null, "v3"}, the return of this method is "%0 v1 v3 %4".

Parameters:
key -
args -
Returns:
String
Throws:
java.util.MissingResourceException - if the key is not in the file
java.lang.NullPointerException - if key is null

TPTP 4.4.0 Testing Tools Project
Public API Specification