Class RepositoryFactory

  extended by

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 DnaJcrDeployer, a servlet context listener that must be configured in the DNA 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 javax.jcr.Session getSession(HttpServletRequest request, String repositoryName, String workspaceName)
Methods inherited from class java.lang.Object
equals, 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 "" .

See Also:
Constant Field Values
Method Detail


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


public static Collection<String> getJcrRepositoryNames()

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