Nuxeo Enterprise Platform 5.4

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

All Known Subinterfaces:
RepositoryManagerLocal
All Known Implementing Classes:
RepositoryManagerBean, 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.
 java.util.Collection<Repository> getRepositories()
          Gets all registered repositories.
 Repository getRepository(java.lang.String name)
          Gets a repository by its name.
 void removeRepository(java.lang.String name)
          Removes a registered repository.
 

Method Detail

getRepositories

java.util.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(java.lang.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(java.lang.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 Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.