org.apache.jackrabbit.servlet
Class ContextRepositoryFactory
java.lang.Object
org.apache.jackrabbit.servlet.ContextRepositoryFactory
- All Implemented Interfaces:
- RepositoryFactory
public class ContextRepositoryFactory
- extends Object
- implements RepositoryFactory
Factory that returns a repository from a servlet context attribute.
- Since:
- 1.4
Constructor Summary |
ContextRepositoryFactory(javax.servlet.ServletContext context,
String name)
Creates a factory that looks up a repository form the configured
servlet context attribute. |
Method Summary |
javax.jcr.Repository |
getRepository()
Returns the repository from the configured servlet context attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextRepositoryFactory
public ContextRepositoryFactory(javax.servlet.ServletContext context,
String name)
- Creates a factory that looks up a repository form the configured
servlet context attribute.
- Parameters:
context
- servlet contextname
- name of the servlet context attribute
getRepository
public javax.jcr.Repository getRepository()
throws javax.jcr.RepositoryException
- Returns the repository from the configured servlet context attribute.
- Specified by:
getRepository
in interface RepositoryFactory
- Returns:
- repository instance
- Throws:
javax.jcr.RepositoryException
- if the servlet context attribute does not
exist, or if it does not contain a
repository instance
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.