org.apache.jackrabbit.commons.repository
Class SingletonRepositoryFactory
java.lang.Object
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(javax.jcr.Repository repository)
Creates a repository factory that always returns the given repository. |
Method Summary |
javax.jcr.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 |
SingletonRepositoryFactory
public SingletonRepositoryFactory(javax.jcr.Repository repository)
- Creates a repository factory that always returns the given repository.
- Parameters:
repository
- singleton repository instance.
getRepository
public javax.jcr.Repository getRepository()
- Returns the configured repository instance.
- Specified by:
getRepository
in interface RepositoryFactory
- Returns:
- singleton repository instance
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.