Class Jcr2spiRepositoryFactory
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory
-
- All Implemented Interfaces:
RepositoryFactory
public class Jcr2spiRepositoryFactory extends Object implements RepositoryFactory
This implementation ofRepositoryFactory
is 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 class
Jcr2spiRepositoryFactory.RepositoryConfigImpl
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Jcr2spiRepositoryFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Repository
getRepository(Map parameters)
Creates a SPI basedRepository
instance based on theparameters
passed.
-
-
-
Field Detail
-
PARAM_REPOSITORY_SERVICE_FACTORY
public static final String PARAM_REPOSITORY_SERVICE_FACTORY
This parameter determines theRepositoryServiceFactory
to create theRepositoryService
. This is either an instance ofRepositoryServiceFactory
or a fully qualified class name of aRepositoryServiceFactory
having a no argument constructor.- See Also:
- Constant Field Values
-
PARAM_REPOSITORY_CONFIG
public static final String PARAM_REPOSITORY_CONFIG
This parameter contains theRepositoryConfig
instance.- See Also:
- Constant Field Values
-
PARAM_CACHE_BEHAVIOR
public static final String PARAM_CACHE_BEHAVIOR
Optional configuration parameter forRepositoryConfig.getCacheBehaviour()
. This must be eitherCacheBehaviour.INVALIDATE
orCacheBehaviour.OBSERVATION
or 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 anInteger
or 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 anInteger
or 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 theRepositoryService
defined by the specifiedRepositoryConfig
will be wrapped by callingSpiLoggerFactory.create(org.apache.jackrabbit.spi.RepositoryService, org.apache.jackrabbit.spi.commons.logging.LogWriterProvider)
if the parameter value is an instance ofLogWriterProvider
orSpiLoggerFactory.create(org.apache.jackrabbit.spi.RepositoryService)
otherwise.
-
-
Method Detail
-
getRepository
public Repository getRepository(Map parameters) throws RepositoryException
Creates a SPI based
Repository
instance based on theparameters
passed.If the
PARAM_REPOSITORY_SERVICE_FACTORY
parameter is set, the specifiedRepositoryServiceFactory
is used to create theRepositoryService
instance. All parameters are passed toRepositoryServiceFactory.createRepositoryService(Map)
.If the
PARAM_REPOSITORY_CONFIG
parameter is set, the specifiedRepositoryConfig
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
RepositoryServiceFactory
s are:- SPI2DAVex (see jackrabbit-spi2dav module):
Spi2davRepositoryServiceFactory
- SPI2DAV (see jackrabbit-spi2dav module):
Spi2davexRepositoryServiceFactory
- SPI2JCR (see jackrabbit-spi2jcr module)
Spi2jcrRepositoryServiceFactory
NOTE: If the
parameters
map contains anPARAM_LOG_WRITER_PROVIDER
entry theRepositoryService
obtained from the configuration is wrapped by a SPI logger. See theSpiLoggerFactory
for details.- Specified by:
getRepository
in interfaceRepositoryFactory
- Throws:
RepositoryException
- See Also:
RepositoryFactory.getRepository(java.util.Map)
- SPI2DAVex (see jackrabbit-spi2dav module):
-
-