it.eng.spago.cms.init
Class CMSManager

java.lang.Object
  extended by it.eng.spago.cms.init.CMSManager

public class CMSManager
extends java.lang.Object

Mantains the set of connection pool of the configured repositories. Implements methods useful to retrive an istance of a pool an to registry new connection pools


Constructor Summary
CMSManager()
           
 
Method Summary
static void destroyInstance()
          Deletes an istance of the connection pool for the default repository
static void destroyInstance(java.lang.String name)
          Destroy an istance of the connection pool for a specific repository identified by the input name
static java.lang.String getDefaultRepository()
          Gets the name of the default repository
static CMSPool getInstance()
          Retrives the istance of the connection pool for the default repository
static CMSPool getInstance(java.lang.String name)
          Retrives an istance of the connection pool for a specific repository identified by the inupt name
static boolean isRegistered(java.lang.String name)
          Checks if a pool with a given name is alrady registered
protected static void registerRepository(CMSPool pool, java.lang.String name)
          Registers a new repository connection pool
protected static void setDefaultRepository(java.lang.String defaultRepository)
          Sets the name of the default repository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMSManager

public CMSManager()
Method Detail

registerRepository

protected static void registerRepository(CMSPool pool,
                                         java.lang.String name)
                                  throws EMFInternalError
Registers a new repository connection pool

Parameters:
pool, - the connection pool to register
name, - the name of the repository
Throws:
EMFInternalError - Thrown if an error occurs during the registration

getInstance

public static CMSPool getInstance(java.lang.String name)
                           throws EMFInternalError
Retrives an istance of the connection pool for a specific repository identified by the inupt name

Parameters:
name, - name of the repository
Returns:
Instance of the repository connection pool
Throws:
EMFInternalError - Thrown if an error occurs during the retriving operation

isRegistered

public static boolean isRegistered(java.lang.String name)
Checks if a pool with a given name is alrady registered

Parameters:
name - name of the pool
Returns:
boolean, true if the pool name is already registered, false otherwise

destroyInstance

public static void destroyInstance(java.lang.String name)
                            throws EMFInternalError
Destroy an istance of the connection pool for a specific repository identified by the input name

Parameters:
name, - name of the repository
Throws:
EMFInternalError - Thrown if an error occurs during the deletion

getInstance

public static CMSPool getInstance()
                           throws EMFInternalError
Retrives the istance of the connection pool for the default repository

Returns:
Instance of the repository connection pool
Throws:
EMFInternalError - Thrown if an error occurs during the retriving operation

destroyInstance

public static void destroyInstance()
                            throws EMFInternalError
Deletes an istance of the connection pool for the default repository

Throws:
EMFInternalError - Thrown if an error occurs during the deletion

getDefaultRepository

public static java.lang.String getDefaultRepository()
Gets the name of the default repository

Returns:
name of the default repository

setDefaultRepository

protected static void setDefaultRepository(java.lang.String defaultRepository)
Sets the name of the default repository

Parameters:
defaultRepository, - name to set