public class RepositoryManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RepositoryManager.Ref |
Modifier and Type | Field and Description |
---|---|
static String |
REPOSITORY_EVENT |
Constructor and Description |
---|
RepositoryManager(RepositoryService repositoryService) |
Modifier and Type | Method and Description |
---|---|
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) |
public static final String REPOSITORY_EVENT
public RepositoryManager(RepositoryService repositoryService)
public Repository getRepository(String name) throws Exception
Null is returned if no repository with that name was registered.
name
- the repository nameException
- if any error occurs when trying to initialize the
repositorypublic void releaseRepository(String name)
When the repository reference count becomes 0, the repository is shutdown.
name
- the repository namepublic Collection<RepositoryDescriptor> getDescriptors()
public String[] getRepositoryNames()
public RepositoryDescriptor getDescriptor(String name)
public void registerRepository(RepositoryDescriptor rd)
public Repository getOrRegisterRepository(RepositoryDescriptor rd) throws Exception
Exception
public void unregisterRepository(RepositoryDescriptor rd)
public void shutdown()
Copyright © 2013 Nuxeo SA. All Rights Reserved.