Class Jcr2spiRepositoryFactory
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory
-
- All Implemented Interfaces:
RepositoryFactory
public class Jcr2spiRepositoryFactory extends Object implements RepositoryFactory
This implementation ofRepositoryFactoryis capable of returning the various SPI implementations of the Apache Jackrabbit project:- SPI2DAVex (see jackrabbit-spi2dav module)
- SPI2DAV (see jackrabbit-spi2dav module)
- SPI2JCR (see jackrabbit-spi2jcr module)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJcr2spiRepositoryFactory.RepositoryConfigImpl
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Jcr2spiRepositoryFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepositorygetRepository(Map parameters)Creates a SPI basedRepositoryinstance based on theparameterspassed.
-
-
-
Field Detail
-
PARAM_REPOSITORY_SERVICE_FACTORY
public static final String PARAM_REPOSITORY_SERVICE_FACTORY
This parameter determines theRepositoryServiceFactoryto create theRepositoryService. This is either an instance ofRepositoryServiceFactoryor a fully qualified class name of aRepositoryServiceFactoryhaving a no argument constructor.- See Also:
- Constant Field Values
-
PARAM_REPOSITORY_CONFIG
public static final String PARAM_REPOSITORY_CONFIG
This parameter contains theRepositoryConfiginstance.- See Also:
- Constant Field Values
-
PARAM_CACHE_BEHAVIOR
public static final String PARAM_CACHE_BEHAVIOR
Optional configuration parameter forRepositoryConfig.getCacheBehaviour(). This must be eitherCacheBehaviour.INVALIDATEorCacheBehaviour.OBSERVATIONor one of the strings "invalidate" or "observation".- See Also:
- Constant Field Values
-
DEFAULT_CACHE_BEHAVIOR
public static final CacheBehaviour DEFAULT_CACHE_BEHAVIOR
Default value forPARAM_CACHE_BEHAVIOR
-
PARAM_ITEM_CACHE_SIZE
public static final String PARAM_ITEM_CACHE_SIZE
Optional configuration parameter for theRepositoryConfig.getItemCacheSize(). This must be either anIntegeror a String which parses into an integer.- See Also:
- Constant Field Values
-
DEFAULT_ITEM_CACHE_SIZE
public static final int DEFAULT_ITEM_CACHE_SIZE
Default value forPARAM_ITEM_CACHE_SIZE- See Also:
- Constant Field Values
-
PARAM_POLL_TIME_OUT
public static final String PARAM_POLL_TIME_OUT
Optional configuration parameter for theRepositoryConfig.getPollTimeout(). This must be either anIntegeror a String which parses into an integer.- See Also:
- Constant Field Values
-
DEFAULT_POLL_TIME_OUT
public static final int DEFAULT_POLL_TIME_OUT
Default value forPARAM_POLL_TIME_OUT- See Also:
- Constant Field Values
-
PARAM_LOG_WRITER_PROVIDER
public static final String PARAM_LOG_WRITER_PROVIDER
LogWriterProvider configuration parameter: If the parameter is present theRepositoryServicedefined by the specifiedRepositoryConfigwill be wrapped by callingSpiLoggerFactory.create(org.apache.jackrabbit.spi.RepositoryService, org.apache.jackrabbit.spi.commons.logging.LogWriterProvider)if the parameter value is an instance ofLogWriterProviderorSpiLoggerFactory.create(org.apache.jackrabbit.spi.RepositoryService)otherwise.
-
-
Method Detail
-
getRepository
public Repository getRepository(Map parameters) throws RepositoryException
Creates a SPI based
Repositoryinstance based on theparameterspassed.If the
PARAM_REPOSITORY_SERVICE_FACTORYparameter is set, the specifiedRepositoryServiceFactoryis used to create theRepositoryServiceinstance. All parameters are passed toRepositoryServiceFactory.createRepositoryService(Map).If the
PARAM_REPOSITORY_CONFIGparameter is set, the specifiedRepositoryConfiginstance is used to create the repository.If both parameters are set, the latter takes precedence and the former is ignores.
The known SPI implementations and its
RepositoryServiceFactorys are:- SPI2DAVex (see jackrabbit-spi2dav module):
Spi2davRepositoryServiceFactory - SPI2DAV (see jackrabbit-spi2dav module):
Spi2davexRepositoryServiceFactory - SPI2JCR (see jackrabbit-spi2jcr module)
Spi2jcrRepositoryServiceFactory
NOTE: If the
parametersmap contains anPARAM_LOG_WRITER_PROVIDERentry theRepositoryServiceobtained from the configuration is wrapped by a SPI logger. See theSpiLoggerFactoryfor details.- Specified by:
getRepositoryin interfaceRepositoryFactory- Throws:
RepositoryException- See Also:
RepositoryFactory.getRepository(java.util.Map)
- SPI2DAVex (see jackrabbit-spi2dav module):
-
-