de.bea.domingo.i18n
Class ResourceManager

java.lang.Object
  extended by de.bea.domingo.i18n.ResourceManager

public final class ResourceManager
extends java.lang.Object

Manager for internatialized resources.

Author:
Kurt Riede

Method Summary
static void clearResourceCache()
          Clear the cache of all resources currently loaded into the system.
static Resources getBaseResources(java.lang.String baseName)
          Retrieve resource with specified base name.
static Resources getBaseResources(java.lang.String baseName, java.lang.ClassLoader classLoader)
          Retrieve resource with specified base name.
static Resources getClassResources(java.lang.Class clazz)
          Retrieve resource for specified Class.
static java.lang.String getClassResourcesBaseName(java.lang.Class clazz)
          Retrieve resource base name for specified Class.
static Resources getPackageResources(java.lang.Class clazz)
          Retrieve resource for specified Classes package.
static java.lang.String getPackageResourcesBaseName(java.lang.Class clazz)
          Retrieve resource base name for specified Classes package.
static Resources getResources(java.lang.String name)
          Retrieve resource for specified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBaseResources

public static Resources getBaseResources(java.lang.String baseName)
Retrieve resource with specified base name.

Parameters:
baseName - the base name
Returns:
the Resources

getBaseResources

public static Resources getBaseResources(java.lang.String baseName,
                                         java.lang.ClassLoader classLoader)
Retrieve resource with specified base name.

Parameters:
baseName - the base name
classLoader - the classLoader to load resources from
Returns:
the Resources

clearResourceCache

public static void clearResourceCache()
                               throws java.lang.SecurityException
Clear the cache of all resources currently loaded into the system. This method is useful if you need to dump the complete cache and because part of the application is reloading and thus the resources may need to be reloaded.

Note that the caller must have been granted the "i18n.clearCompleteCache" RuntimePermission or else a security exception will be thrown.

Throws:
java.lang.SecurityException - if the caller does not have permission to clear cache

getResources

public static Resources getResources(java.lang.String name)
Retrieve resource for specified name. The base name is determined by name postfixed with ".Resources".

Parameters:
name - the name to use when looking up resources
Returns:
the Resources

getPackageResources

public static Resources getPackageResources(java.lang.Class clazz)
Retrieve resource for specified Classes package. The base name is determined by name of classes package postfixed with ".Resources".

Parameters:
clazz - the Class
Returns:
the Resources

getClassResources

public static Resources getClassResources(java.lang.Class clazz)
Retrieve resource for specified Class. The base name is determined by name of Class postfixed with "Resources".

Parameters:
clazz - the Class
Returns:
the Resources

getPackageResourcesBaseName

public static java.lang.String getPackageResourcesBaseName(java.lang.Class clazz)
Retrieve resource base name for specified Classes package. The base name is determined by name of classes package postfixed with ".Resources".

Parameters:
clazz - the Class
Returns:
the resource base name

getClassResourcesBaseName

public static java.lang.String getClassResourcesBaseName(java.lang.Class clazz)
Retrieve resource base name for specified Class. The base name is determined by name of Class postfixed with "Resources".

Parameters:
clazz - the Class
Returns:
the resource base name


Domingo Java-API