org.opencms.repository
Class CmsRepositoryManager

java.lang.Object
  extended by org.opencms.repository.CmsRepositoryManager

public class CmsRepositoryManager
extends java.lang.Object

The RepositoryManager keeps a list with all configured I_CmsRepository and can be used to get a repository by its name.

The configuration of the repositories is done in the configuration file opencms-importexport.xml.

Since:
6.2.4
Version:
$Revision: 1.8 $
Author:
Peter Bonrad

Constructor Summary
CmsRepositoryManager()
          Creates a new instance for the resource manager, will be called by the vfs configuration manager.
CmsRepositoryManager(boolean configured)
          Creates a new unconfigured instance of the repository manager.
 
Method Summary
 void addRepositoryClass(I_CmsRepository rep)
          Adds a new configured repository.
 java.util.List getRepositories()
          Returns the repositories.
 I_CmsRepository getRepository(java.lang.String name)
          Returns the repository with the given name.
 void initConfiguration()
          Initializes a configuration after all parameters have been added.
 boolean isConfigured()
          Returns the configured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsRepositoryManager

public CmsRepositoryManager()
Creates a new instance for the resource manager, will be called by the vfs configuration manager.


CmsRepositoryManager

public CmsRepositoryManager(boolean configured)
Creates a new unconfigured instance of the repository manager.

Is used if there are no repositories configured.

Parameters:
configured - determines if the repository manager was configured
Method Detail

addRepositoryClass

public void addRepositoryClass(I_CmsRepository rep)
                        throws CmsConfigurationException
Adds a new configured repository.

Parameters:
rep - the repository to add
Throws:
CmsConfigurationException - in case the resource manager configuration is already initialized

getRepositories

public java.util.List getRepositories()
Returns the repositories.

Returns:
the repositories

getRepository

public I_CmsRepository getRepository(java.lang.String name)
Returns the repository with the given name.

Parameters:
name - the name of the repository
Returns:
the repository configured for that name

initConfiguration

public void initConfiguration()
                       throws CmsConfigurationException
Initializes a configuration after all parameters have been added.

Throws:
CmsConfigurationException - if something goes wrong

isConfigured

public boolean isConfigured()
Returns the configured.

Returns:
the configured