@ThreadSafe public class RepositoryManager extends Object
ServiceLoader
and RepositoriesContainer
mechanism.Modifier and Type | Method and Description |
---|---|
static Set<String> |
getJcrRepositoryNames()
Returns a set with all the names of the available repositories.
|
static Repository |
getRepository(String repositoryName)
Returns the
Repository instance with the given name. |
static Session |
getSession(HttpServletRequest request,
String repositoryName,
String workspaceName)
Get a JCR Session for the named workspace in the named repository, using the supplied HTTP servlet request for
authentication information.
|
public static Session getSession(HttpServletRequest request, String repositoryName, String workspaceName) throws RepositoryException
request
- the servlet request; may not be null or unauthenticatedrepositoryName
- the name of the repository in which the session is createdworkspaceName
- the name of the workspace to which the session should be connectedRepositoryException
- if the named repository does not exist or there was a problem obtaining the named repositorypublic static Repository getRepository(String repositoryName) throws NoSuchRepositoryException
Repository
instance with the given name.repositoryName
- a non-null
stringRepository
instance, never null
NoSuchRepositoryException
- if no repository with the given name exists.Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.