org.apache.jackrabbit.commons
Class AbstractRepository

java.lang.Object
  extended by 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.


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
AbstractRepository()
           
 
Method Summary
 Session login()
          Calls Repository.login(Credentials, String) with null arguments.
 Session login(Credentials credentials)
          Calls Repository.login(Credentials, String) with the given credentials and a null workspace name.
 Session login(String workspace)
          Calls Repository.login(Credentials, String) with null credentials and the given workspace name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jcr.Repository
getDescriptor, getDescriptorKeys, login
 

Constructor Detail

AbstractRepository

public AbstractRepository()
Method Detail

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.