ModeShape Distribution 3.0.0.Beta4

org.modeshape.web.jcr
Class RepositoryManager

java.lang.Object
  extended by 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.


Method Summary
static Set<String> getJcrRepositoryNames()
           
static Repository getRepository(String repositoryName)
           
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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 unauthenticated
repositoryName - the name of the repository in which the session is created
workspaceName - 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()

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.