com.ibm.commerce.tools.util
Class ResourceDirectory

java.lang.Object
  |
  +--com.ibm.commerce.tools.util.ResourceDirectory

public class ResourceDirectory
extends java.lang.Object

Maintains the set of all registered bean instantiators.


Method Summary
static void initializeInstDirectory()
          Loads all resources defined by the resources.xml files.
static void loadInstDirectory(java.util.Vector model_files)
          Populates the instantiator directory from the given XML based configuration file.
static java.lang.Object lookup(java.lang.String key)
          Gets the resource from the cache.
static java.lang.Object lookup(java.lang.String key, java.util.Locale locale)
          Gets the resource from the cache.
static java.lang.Object lookup(java.lang.String name_space, java.lang.String inst_name)
          Gets the resource from the cache.
static java.lang.Object lookup(java.lang.String name_space, java.lang.String inst_name, java.util.Locale locale)
          Gets the resource from the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initializeInstDirectory

public static final void initializeInstDirectory()
                                          throws ECSystemException
Loads all resources defined by the resources.xml files. Each xml file may include additional files which must then also be loaded. Each resource is stored in the namespace defined in the xml file.
Throws:
If - an error occurs, an exception is thrown.

loadInstDirectory

public static final void loadInstDirectory(java.util.Vector model_files)
                                    throws ECSystemException
Populates the instantiator directory from the given XML based configuration file.
Parameters:
model_files - The XML configuration file.
Throws:
If - an error occurs, an exception is thrown.

lookup

public static final java.lang.Object lookup(java.lang.String key)
                                     throws ECSystemException
Gets the resource from the cache. Since no locale has been specified, the default server locale is used if the resource is locale dependant.
Parameters:
key - Name of resource in form .
Returns:
Object Resoure object
Throws:
If - an error occurs, an exception is thrown.

lookup

public static final java.lang.Object lookup(java.lang.String key,
                                            java.util.Locale locale)
                                     throws ECSystemException
Gets the resource from the cache.
Parameters:
key - Name of resource in form .
locale - Version of resource to retrieve
Returns:
Object Resoure object
Throws:
If - an error occurs, an exception is thrown.

lookup

public static final java.lang.Object lookup(java.lang.String name_space,
                                            java.lang.String inst_name)
                                     throws ECSystemException
Gets the resource from the cache. Since no locale has been specified, the default server locale is used if the resource is locale dependant.
Parameters:
name_space - Locale of resource
inst_name - Name of resource
Returns:
Object Resoure object
Throws:
If - an error occurs, an exception is thrown.

lookup

public static final java.lang.Object lookup(java.lang.String name_space,
                                            java.lang.String inst_name,
                                            java.util.Locale locale)
                                     throws ECSystemException
Gets the resource from the cache.
Parameters:
name_space - Locale of resource
inst_name - Name of resource
locale - Version of resource to retrieve
Returns:
Object Resoure object
Throws:
If - an error occurs, an exception is thrown.