Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.repository.ejb
Class RepositoryManagerBean

java.lang.Object
  extended by org.nuxeo.ecm.core.repository.ejb.RepositoryManagerBean
All Implemented Interfaces:
RepositoryManager, RepositoryManagerLocal

public class RepositoryManagerBean
extends java.lang.Object
implements RepositoryManagerLocal

Exposes a local repository manager as an stateless session bean.

Author:
Bogdan Stefanescu

Constructor Summary
RepositoryManagerBean()
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryManagerBean

public RepositoryManagerBean()
Method Detail

addRepository

public void addRepository(Repository repository)
Description copied from interface: RepositoryManager
Registers a new repository.

Specified by:
addRepository in interface RepositoryManager
Parameters:
repository - the repository to register

getRepositories

public java.util.Collection<Repository> getRepositories()
Description copied from interface: RepositoryManager
Gets all registered repositories.

Specified by:
getRepositories in interface RepositoryManager
Returns:
a read-only collection of repositories or an empty one if no repositories was defined

getRepository

public Repository getRepository(java.lang.String name)
Description copied from interface: RepositoryManager
Gets a repository by its name.

Specified by:
getRepository in interface RepositoryManager
Parameters:
name - the repository name
Returns:
the repository or null if not found

removeRepository

public void removeRepository(java.lang.String name)
Description copied from interface: RepositoryManager
Removes a registered repository.

Do nothing if the repository is not registered.

Specified by:
removeRepository in interface RepositoryManager
Parameters:
name - the repository name to unregister

clear

public void clear()
Description copied from interface: RepositoryManager
Unregisters all repositories.

Specified by:
clear in interface RepositoryManager

getDefaultRepository

public Repository getDefaultRepository()
Description copied from interface: RepositoryManager
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.

Specified by:
getDefaultRepository in interface RepositoryManager
Returns:
the default repository

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.