org.apache.jackrabbit.commons.repository
Class SingletonRepositoryFactory

java.lang.Object
  extended by org.apache.jackrabbit.commons.repository.SingletonRepositoryFactory
All Implemented Interfaces:
RepositoryFactory

public class SingletonRepositoryFactory
extends Object
implements RepositoryFactory

Repository factory that always returns the same configured repository.


Constructor Summary
SingletonRepositoryFactory(Repository repository)
          Creates a repository factory that always returns the given repository.
 
Method Summary
 Repository getRepository()
          Returns the configured repository instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonRepositoryFactory

public SingletonRepositoryFactory(Repository repository)
Creates a repository factory that always returns the given repository.

Parameters:
repository - singleton repository instance.
Method Detail

getRepository

public Repository getRepository()
Returns the configured repository instance.

Specified by:
getRepository in interface RepositoryFactory
Returns:
singleton repository instance


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