|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.web.jcr.spi.FactoryRepositoryProvider
public class FactoryRepositoryProvider
Repository provider backed by the ModeShape RepositoryFactory
implementation.
The provider instantiates a {code JcrEngine} that is configured from the file in the location specified by the servlet context
parameter org.modeshape.web.jcr.rest.CONFIG_FILE
. This location must be accessible by the classloader for this class.
This class is thread-safe.
RepositoryProvider
,
Class.getResourceAsStream(String)
Field Summary | |
---|---|
static String |
JCR_URL
|
Constructor Summary | |
---|---|
FactoryRepositoryProvider()
|
Method Summary | |
---|---|
Set<String> |
getJcrRepositoryNames()
Returns the available repository names JCR implementations that do not support multiple repositories on the same server should provide a singleton set containing some default repository name. |
Session |
getSession(HttpServletRequest request,
String repositoryName,
String workspaceName)
Returns an active session for the given workspace name in the named repository. |
void |
shutdown()
Signals the repository provider that it should complete any pending transactions, shutdown, and release any external resource held. |
void |
startup(ServletContext context)
Signals the repository provider that it should initialize itself based on the provided servlet
context and begin accepting connections. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String JCR_URL
Constructor Detail |
---|
public FactoryRepositoryProvider()
Method Detail |
---|
public Set<String> getJcrRepositoryNames()
RepositoryProvider
JCR implementations that do not support multiple repositories on the same server should provide a singleton set containing some default repository name.
getJcrRepositoryNames
in interface RepositoryProvider
public void startup(ServletContext context)
RepositoryProvider
servlet
context
and begin accepting connections.
startup
in interface RepositoryProvider
context
- the servlet context for the REST servletpublic void shutdown()
RepositoryProvider
shutdown
in interface RepositoryProvider
public Session getSession(HttpServletRequest request, String repositoryName, String workspaceName) throws RepositoryException
getSession
in interface RepositoryProvider
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
RepositoryException
- if any other error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |