org.apache.jackrabbit.commons.repository
Class EmptyRepository

java.lang.Object
  extended by org.apache.jackrabbit.commons.AbstractRepository
      extended by org.apache.jackrabbit.commons.repository.EmptyRepository
All Implemented Interfaces:
Repository

public class EmptyRepository
extends AbstractRepository

An empty repository with no descriptors and no workspaces. This class can be used as a dummy sentinel in cases where a proper content repository is not available.

Since:
1.4

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
EmptyRepository()
           
 
Method Summary
 String getDescriptor(String key)
          Returns null since this repository contains no descriptors.
 String[] getDescriptorKeys()
          Returns an empty array since this repository contains no descriptors.
 Session login(Credentials credentials, String workspace)
          Throws an exception since this repository contains no workspaces.
 
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

EmptyRepository

public EmptyRepository()
Method Detail

getDescriptor

public String getDescriptor(String key)
Returns null since this repository contains no descriptors.

Returns:
null

getDescriptorKeys

public String[] getDescriptorKeys()
Returns an empty array since this repository contains no descriptors.

Returns:
empty array

login

public Session login(Credentials credentials,
                     String workspace)
              throws NoSuchWorkspaceException
Throws an exception since this repository contains no workspaces.

Returns:
nothing
Throws:
NoSuchWorkspaceException - always thrown


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.