Class RepositoryFactory

  extended by org.modeshape.web.jcr.RepositoryFactory

public class RepositoryFactory
extends Object

Factory that provides implementations of the repository provider SPI by wrapping a RepositoryProvider.

The repository factory implements a lifecycle for the repository providers. It is first initialized by ModeShapeJcrDeployer, a servlet context listener that must be configured in the ModeShape JCR REST web configuration (web.xml). The repository factory looks in the context for a parameter with the name of PROVIDER_KEY. This is assumed to be the FQN of the repository provider, which the factory will then instantiate.

The repository factory is then able to respond to multiple requests to list the repository names and return active JCR sessions until the shutdown method is called.

The shutdown method is a simple proxy to the RepositoryProvider.shutdown() repository provider's shutdown method}.

Field Summary
static String PROVIDER_KEY
          The FQN of the repository provider class.
Method Summary
static Collection<String> getJcrRepositoryNames()
static Session getSession(javax.servlet.http.HttpServletRequest request, String repositoryName, String workspaceName)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final String PROVIDER_KEY
The FQN of the repository provider class. Currently set to "org.modeshape.web.jcr.REPOSITORY_PROVIDER" .

See Also:
Constant Field Values
Method Detail


public static Session getSession(javax.servlet.http.HttpServletRequest request,
                                 String repositoryName,
                                 String workspaceName)
                          throws RepositoryException


public static Collection<String> getJcrRepositoryNames()

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