wt.tools.resource
Class ResourceInfoRepository

java.lang.Object
  extended bywt.tools.resource.ResourceInfoRepository

public class ResourceInfoRepository
extends Object

Repository of localizable and customizable resources.

Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
static String ENUM
          

Supported API: false
private static Hashtable infoCache
           
private static String RESOURCE
           
static String STRING
          

Supported API: false
(package private) static boolean VERBOSE
           
 
Constructor Summary
ResourceInfoRepository()
           
 
Method Summary
static void clearCache()
          Empty the cache, so that ResourceInfo requests will be fulfilled by loading the files.
protected static ResourceInfo constructInfo(String name)
           
protected static boolean fileExists(String fullFileName)
           
static ResourceInfo getResourceInfo(String infoName)
          Get an existing Info instance for the infoName, if one exists.
static ResourceInfo getResourceInfo(String infoName, Locale locale)
          Get an existing Info instance for the infoName, for the specified locale, if one exists.
private static ResourceInfo loadInfo(String infoName, Locale locale, ResourceInfo localizingInfo, ResourceInfo info)
           
private static PropertiesMap read(String infoName, Locale locale, boolean customization)
           
private static PropertiesMap readFile(String fullFileName, Locale locale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

STRING

public static final String STRING


Supported API: false

See Also:
Constant Field Values

ENUM

public static final String ENUM


Supported API: false

See Also:
Constant Field Values

infoCache

private static final Hashtable infoCache

VERBOSE

static final boolean VERBOSE
See Also:
Constant Field Values
Constructor Detail

ResourceInfoRepository

public ResourceInfoRepository()
Method Detail

getResourceInfo

public static ResourceInfo getResourceInfo(String infoName)
                                    throws WTResourceException
Get an existing Info instance for the infoName, if one exists.

Supported API: false

Parameters:
infoName -
Returns:
ResourceInfo
Throws:
WTResourceException

getResourceInfo

public static ResourceInfo getResourceInfo(String infoName,
                                           Locale locale)
                                    throws WTResourceException
Get an existing Info instance for the infoName, for the specified locale, if one exists.

Supported API: false

Parameters:
infoName -
locale -
Returns:
ResourceInfo
Throws:
WTResourceException

loadInfo

private static ResourceInfo loadInfo(String infoName,
                                     Locale locale,
                                     ResourceInfo localizingInfo,
                                     ResourceInfo info)
                              throws WTResourceException
Throws:
WTResourceException

read

private static PropertiesMap read(String infoName,
                                  Locale locale,
                                  boolean customization)
                           throws WTResourceException
Throws:
WTResourceException

readFile

private static PropertiesMap readFile(String fullFileName,
                                      Locale locale)
                               throws WTResourceException
Throws:
WTResourceException

fileExists

protected static boolean fileExists(String fullFileName)

constructInfo

protected static ResourceInfo constructInfo(String name)
                                     throws WTResourceException
Throws:
WTResourceException

clearCache

public static void clearCache()
Empty the cache, so that ResourceInfo requests will be fulfilled by loading the files.

Supported API: true