Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.api.repository
Interface RepositoryManager

All Known Implementing Classes:
RepositoryManagerImpl

public interface RepositoryManager

Manage repositories. TODO: This should be merged with the RepositoryManager from the core module

Author:
Bogdan Stefanescu

Method Summary
 void addRepository(Repository repository)
          Registers a new repository.
 void clear()
          Unregisters all repositories.
 Repository getDefaultRepository()
          Gets the default repository.
 Collection<Repository> getRepositories()
          Gets all registered repositories.
 Repository getRepository(String name)
          Gets a repository by its name.
 void removeRepository(String name)
          Removes a registered repository.
 

Method Detail

getRepositories

Collection<Repository> getRepositories()
Gets all registered repositories.

Returns:
a read-only collection of repositories or an empty one if no repositories was defined

getRepository

Repository getRepository(String name)
Gets a repository by its name.

Parameters:
name - the repository name
Returns:
the repository or null if not found

addRepository

void addRepository(Repository repository)
Registers a new repository.

Parameters:
repository - the repository to register

removeRepository

void removeRepository(String name)
Removes a registered repository.

Do nothing if the repository is not registered.

Parameters:
name - the repository name to unregister

clear

void clear()
Unregisters all repositories.


getDefaultRepository

Repository getDefaultRepository()
Gets the default repository.

If there is not a default repository returns the first registered. repository

This is a convenient method to get the repository for application having a single repository.

Returns:
the default repository

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.