public class Jcr2spiRepositoryFactory extends Object implements RepositoryFactory
RepositoryFactory is capable of returning the various
SPI implementations of the Apache Jackrabbit project:
| Modifier and Type | Class and Description |
|---|---|
static class |
Jcr2spiRepositoryFactory.RepositoryConfigImpl |
| Constructor and Description |
|---|
Jcr2spiRepositoryFactory() |
| Modifier and Type | Method and Description |
|---|---|
Repository |
getRepository(Map parameters)
Creates a SPI based
Repository instance based on the
parameters passed. |
public static final String PARAM_REPOSITORY_SERVICE_FACTORY
RepositoryServiceFactory to create the
RepositoryService. This is either an instance of RepositoryServiceFactory
or a fully qualified class name of a RepositoryServiceFactory
having a no argument constructor.public static final String PARAM_REPOSITORY_CONFIG
RepositoryConfig instance.public static final String PARAM_CACHE_BEHAVIOR
RepositoryConfig.getCacheBehaviour(). This
must be either CacheBehaviour.INVALIDATE or CacheBehaviour.OBSERVATION
or one of the strings "invalidate" or "observation".public static final CacheBehaviour DEFAULT_CACHE_BEHAVIOR
PARAM_CACHE_BEHAVIORpublic static final String PARAM_ITEM_CACHE_SIZE
RepositoryConfig.getItemCacheSize(). This
must be either an Integer or a String which parses into an integer.public static final int DEFAULT_ITEM_CACHE_SIZE
PARAM_ITEM_CACHE_SIZEpublic static final String PARAM_POLL_TIME_OUT
RepositoryConfig.getPollTimeout(). This
must be either an Integer or a String which parses into an integer.public static final int DEFAULT_POLL_TIME_OUT
PARAM_POLL_TIME_OUTpublic static final String PARAM_LOG_WRITER_PROVIDER
RepositoryService defined by the specified
RepositoryConfig will be wrapped by calling
SpiLoggerFactory.create(org.apache.jackrabbit.spi.RepositoryService, org.apache.jackrabbit.spi.commons.logging.LogWriterProvider)
if the parameter value is an instance of LogWriterProvider or
SpiLoggerFactory.create(org.apache.jackrabbit.spi.RepositoryService)
otherwise.public Repository getRepository(Map parameters) throws RepositoryException
Creates a SPI based Repository instance based on the
parameters passed.
If the PARAM_REPOSITORY_SERVICE_FACTORY parameter is set,
the specified RepositoryServiceFactory is used to create the
RepositoryService instance. All parameters are passed to
RepositoryServiceFactory.createRepositoryService(Map).
If the PARAM_REPOSITORY_CONFIG parameter is set, the
specified RepositoryConfig instance 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:
Spi2davRepositoryServiceFactorySpi2davexRepositoryServiceFactorySpi2jcrRepositoryServiceFactory
NOTE: If the parameters map contains an
PARAM_LOG_WRITER_PROVIDER entry the
RepositoryService obtained
from the configuration is wrapped by a SPI logger. See the
SpiLoggerFactory
for details.
getRepository in interface RepositoryFactoryRepositoryExceptionRepositoryFactory.getRepository(java.util.Map)Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.