com.ibm.dse.tools.workbench.base
Class RepositoryRegistry

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.base.RepositoryRegistry

public class RepositoryRegistry
extends java.lang.Object

The class RepositoryRegistry stores in a hashtable the available database connections


Field Summary
protected static RepositoryRegistry registry
           
protected static java.util.Hashtable repositories
           
 
Constructor Summary
RepositoryRegistry()
          Constructs the RepositoryRegistry.
 
Method Summary
static java.lang.String addRepository(Repository repository)
          Adds a new Repository to the list.
static RepositoryRegistry getRegistry()
          Returns the instance of RepositoryRegistry
static java.util.Hashtable getRepositories()
          Returns the list of repositories.
static Repository getRepository(java.lang.String repository)
          Returns the Repository registered using the key passed.
static java.lang.String getRepositoryKey(Repository repository)
          Constructs the key to register this Repository..
static void removeRepository(Repository repository)
          Removes the Repository from the list
static void removeRepository(java.lang.String repositoryKey)
          Removes the Repository from the list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

registry

protected static RepositoryRegistry registry

repositories

protected static java.util.Hashtable repositories
Constructor Detail

RepositoryRegistry

public RepositoryRegistry()
Constructs the RepositoryRegistry.
Method Detail

addRepository

public static java.lang.String addRepository(Repository repository)
Adds a new Repository to the list.
Parameters:
repository - com.ibm.dse.workbench.base.Repository
Returns:
String. Key to register the Repository into the Registry.

getRegistry

public static RepositoryRegistry getRegistry()
Returns the instance of RepositoryRegistry
Returns:
com.ibm.dse.tools.workbench.base.RepositoryRegistry

getRepositories

public static java.util.Hashtable getRepositories()
Returns the list of repositories.
Returns:
java.util.Hashtable.

getRepository

public static Repository getRepository(java.lang.String repository)
Returns the Repository registered using the key passed.
Parameters:
repository - java.lang.String.
Returns:
com.ibm.dse.tools.workbench.base.Repository

getRepositoryKey

public static java.lang.String getRepositoryKey(Repository repository)
Constructs the key to register this Repository..
Parameters:
repository - com.ibm.dse.tools.workbench.base.Repository.
Returns:
java.lang.String.

removeRepository

public static void removeRepository(Repository repository)
                             throws RepositoryException
Removes the Repository from the list
Parameters:
repository - com.ibm.dse.tools.workbench.base.Repository

removeRepository

public static void removeRepository(java.lang.String repositoryKey)
                             throws RepositoryException
Removes the Repository from the list
Parameters:
repositoryKey - String.