org.apache.jackrabbit.commons
Class AbstractRepository
java.lang.Object
org.apache.jackrabbit.commons.AbstractRepository
- All Implemented Interfaces:
- Repository
- Direct Known Subclasses:
- BindableRepository, EmptyRepository, ProxyRepository, RepositoryImpl, RepositoryImpl
public abstract class AbstractRepository
- extends Object
- implements Repository
Abstract base class for implementing the JCR Repository
interface.
This class implements the three utility login methods by calling the
Repository.login(Credentials, String)
method with null
arguments as specified in the JCR API.
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRepository
public AbstractRepository()
login
public Session login()
throws RepositoryException
- Calls
Repository.login(Credentials, String)
with
null
arguments.
- Specified by:
login
in interface Repository
- Returns:
- logged in session
- Throws:
RepositoryException
- if an error occurs
login
public Session login(Credentials credentials)
throws RepositoryException
- Calls
Repository.login(Credentials, String)
with
the given credentials and a null
workspace name.
- Specified by:
login
in interface Repository
- Parameters:
credentials
- login credentials
- Returns:
- logged in session
- Throws:
RepositoryException
- if an error occurs
login
public Session login(String workspace)
throws RepositoryException
- Calls
Repository.login(Credentials, String)
with
null
credentials and the given workspace name.
- Specified by:
login
in interface Repository
- Parameters:
workspace
- workspace name
- Returns:
- logged in session
- Throws:
RepositoryException
- if an error occurs
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.