deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.io.datastore
Class DatastoreRegistry

java.lang.Object
  extended by org.deegree.io.datastore.DatastoreRegistry

public class DatastoreRegistry
extends java.lang.Object

Responsible for the lookup of Datastore instances by their configuration information.

This is necessary to ensure that application schemas which use the same backend and identical configuration information are served by the same Datastore instance.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Markus Schneider , last edited by: $Author: mschneider $

Constructor Summary
DatastoreRegistry()
           
 
Method Summary
static void deregisterDatastore(DatastoreConfiguration config)
          Returns the Datastore instance that serves the given DatastoreConfiguration from the registry.
static Datastore getDatastore(DatastoreConfiguration config)
          Returns the Datastore instance that serves the given DatastoreConfiguration.
static java.lang.Class<Datastore> getDatastoreClass(java.lang.String commonName)
          Returns the Class of a Datastore identified by the passed name.
static void registerDatastore(Datastore ds)
          Registers a new Datastore instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatastoreRegistry

public DatastoreRegistry()
Method Detail

getDatastoreClass

public static java.lang.Class<Datastore> getDatastoreClass(java.lang.String commonName)
                                                    throws java.lang.IllegalArgumentException
Returns the Class of a Datastore identified by the passed name. The mapping between common names and Datastore classes is stored in the file org.deegree.io.datastore.datastores.datastore.properties.

Parameters:
commonName -
Returns:
Datastore class
Throws:
java.lang.IllegalArgumentException

getDatastore

public static Datastore getDatastore(DatastoreConfiguration config)
Returns the Datastore instance that serves the given DatastoreConfiguration.

Parameters:
config -
Returns:
Datastore instance or null, if no Datastore is registered for this configuration

registerDatastore

public static void registerDatastore(Datastore ds)
                              throws DatastoreException
Registers a new Datastore instance.

Parameters:
ds -
Throws:
DatastoreException - if Datastore for configuration is already registered

deregisterDatastore

public static void deregisterDatastore(DatastoreConfiguration config)
                                throws DatastoreException
Returns the Datastore instance that serves the given DatastoreConfiguration from the registry.

Parameters:
config -
Throws:
DatastoreException - if no Datastore for configuration is registered

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org