Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.repository
Class RepositoryManager

java.lang.Object
  extended by org.nuxeo.ecm.core.repository.RepositoryManager

public class RepositoryManager
extends Object

Author:
Bogdan Stefanescu

Nested Class Summary
static class RepositoryManager.Ref
           
 
Field Summary
static String REPOSITORY_EVENT
           
 
Constructor Summary
RepositoryManager(RepositoryService repositoryService)
           
 
Method Summary
 RepositoryDescriptor getDescriptor(String name)
           
 Collection<RepositoryDescriptor> getDescriptors()
           
 Repository getOrRegisterRepository(RepositoryDescriptor rd)
           
 Repository getRepository(String name)
          Gets a repository given its name.
 String[] getRepositoryNames()
           
 void registerRepository(RepositoryDescriptor rd)
           
 void releaseRepository(String name)
          Releases the reference to the repository.
 void shutdown()
           
 void unregisterRepository(RepositoryDescriptor rd)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPOSITORY_EVENT

public static final String REPOSITORY_EVENT
See Also:
Constant Field Values
Constructor Detail

RepositoryManager

public RepositoryManager(RepositoryService repositoryService)
Method Detail

getRepository

public Repository getRepository(String name)
                         throws Exception
Gets a repository given its name.

Null is returned if no repository with that name was registered.

Parameters:
name - the repository name
Returns:
the repository instance or null if no repository with that name was registered
Throws:
Exception - if any error occurs when trying to initialize the repository

releaseRepository

public void releaseRepository(String name)
Releases the reference to the repository.

When the repository reference count becomes 0, the repository is shutdown.

Parameters:
name - the repository name

getDescriptors

public Collection<RepositoryDescriptor> getDescriptors()

getRepositoryNames

public String[] getRepositoryNames()

getDescriptor

public RepositoryDescriptor getDescriptor(String name)

registerRepository

public void registerRepository(RepositoryDescriptor rd)

getOrRegisterRepository

public Repository getOrRegisterRepository(RepositoryDescriptor rd)
                                   throws Exception
Throws:
Exception

unregisterRepository

public void unregisterRepository(RepositoryDescriptor rd)

shutdown

public void shutdown()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.