org.gcube.portlets.user.tdw.server.datasource
Class DataSourceFactoryRegistry

java.lang.Object
  extended by org.gcube.portlets.user.tdw.server.datasource.DataSourceFactoryRegistry

public class DataSourceFactoryRegistry
extends Object

Author:
"Federico De Faveri defaveri@isti.cnr.it"

Field Summary
protected static DataSourceFactoryRegistry instance
           
protected  Map<String,DataSourceFactory> instancesRegistry
           
protected  org.apache.log4j.Logger logger
           
 
Constructor Summary
protected DataSourceFactoryRegistry()
           
 
Method Summary
 void add(DataSourceFactory factory)
          Adds a new DataSourceFactory to the registry.
protected  void addInstancesInEnv()
           
 boolean exists(String factoryId)
           
 DataSourceFactory get(String factoryId)
          Retrieves the specified DataSourceFactory.
static DataSourceFactoryRegistry getInstance()
           
 void remove(String factoryId)
          Removes the specified DataSourceFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected static DataSourceFactoryRegistry instance

logger

protected org.apache.log4j.Logger logger

instancesRegistry

protected Map<String,DataSourceFactory> instancesRegistry
Constructor Detail

DataSourceFactoryRegistry

protected DataSourceFactoryRegistry()
Method Detail

getInstance

public static DataSourceFactoryRegistry getInstance()

addInstancesInEnv

protected void addInstancesInEnv()

add

public void add(DataSourceFactory factory)
Adds a new DataSourceFactory to the registry.

Parameters:
factory - the DataSourceFactory to add.

get

public DataSourceFactory get(String factoryId)
Retrieves the specified DataSourceFactory.

Parameters:
factoryId - the DataSourceFactory id.
Returns:
the DataSourceFactory if found, null otherwise.

exists

public boolean exists(String factoryId)

remove

public void remove(String factoryId)
Removes the specified DataSourceFactory.

Parameters:
factoryId - the DataSourceFactory id.


Copyright © 2013. All Rights Reserved.