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