|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.commons.AbstractRepository
org.apache.jackrabbit.commons.repository.ProxyRepository
org.apache.jackrabbit.servlet.ServletRepository
public class ServletRepository
Proxy for a repository bound in servlet context. The configured repository attribute is looked up from the servlet context during each method call. Thus the repository does not need to exist when this class is instantiated. The repository can also be replaced with another repository during the lifetime of an instance of this class.
A typical way to use this class would be:
public class MyServlet extends HttpServlet { private final Repository repository = new ServletRepository(this); protected void doGet( HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { Session session = repository.login(); try { ...; } finally { session.logout(); } } catch (RepositoryException e) { throw new ServletException(e); } } }
ServletRepositoryFactory
Field Summary |
---|
Fields inherited from interface javax.jcr.Repository |
---|
LEVEL_1_SUPPORTED, LEVEL_2_SUPPORTED, OPTION_LOCKING_SUPPORTED, OPTION_OBSERVATION_SUPPORTED, OPTION_QUERY_SQL_SUPPORTED, OPTION_TRANSACTIONS_SUPPORTED, OPTION_VERSIONING_SUPPORTED, QUERY_XPATH_DOC_ORDER, QUERY_XPATH_POS_INDEX, REP_NAME_DESC, REP_VENDOR_DESC, REP_VENDOR_URL_DESC, REP_VERSION_DESC, SPEC_NAME_DESC, SPEC_VERSION_DESC |
Constructor Summary | |
---|---|
ServletRepository(javax.servlet.GenericServlet servlet)
Creates a proxy for a repository found in the context of the given servlet. |
Method Summary |
---|
Methods inherited from class org.apache.jackrabbit.commons.repository.ProxyRepository |
---|
getDescriptor, getDescriptorKeys, login |
Methods inherited from class org.apache.jackrabbit.commons.AbstractRepository |
---|
login, login, login |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServletRepository(javax.servlet.GenericServlet servlet)
servlet
- servlet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |