Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.io.datastore
Class DatastoreRegistry

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

    public class DatastoreRegistry

extends 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 Class<Datastore>` | `getDatastoreClass(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 Class<Datastore> getDatastoreClass(String commonName)
                                              throws 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:
    `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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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