org.modeshape.web.jcr
Class RepositoryManager
java.lang.Object
org.modeshape.web.jcr.RepositoryManager
@ThreadSafe
public class RepositoryManager
- extends Object
Manager for accessing JCR Repository instances. This manager uses the idiomatic way to find JCR Repository (and ModeShape
Repositories) instances via the ServiceLoader and JCR RepositoryFactory mechanism.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getSession
public static Session getSession(HttpServletRequest request,
String repositoryName,
String workspaceName)
throws RepositoryException
- Get a JCR Session for the named workspace in the named repository, using the supplied HTTP servlet request for
authentication information.
- Parameters:
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 connected
- Returns:
- an active session with the given workspace in the named repository
- Throws:
RepositoryException - if the named repository does not exist or there was a problem obtaining the named repository
getRepository
public static Repository getRepository(String repositoryName)
throws NoSuchRepositoryException
- Throws:
NoSuchRepositoryException
getJcrRepositoryNames
public static Set<String> getJcrRepositoryNames()
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.