]> git.argeo.org Git - lgpl/argeo-commons.git/blob - jcr/org.argeo.cms.jcr/src/org/argeo/jackrabbit/client/ClientDavexRepositoryFactory.java
Disable OSGi configuration admin and LDIF-based deploy config.
[lgpl/argeo-commons.git] / jcr / org.argeo.cms.jcr / src / org / argeo / jackrabbit / client / ClientDavexRepositoryFactory.java
1 package org.argeo.jackrabbit.client;
2
3 import java.util.Map;
4
5 import javax.jcr.Repository;
6 import javax.jcr.RepositoryException;
7 import javax.jcr.RepositoryFactory;
8
9 import org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory;
10 import org.apache.jackrabbit.jcr2spi.RepositoryImpl;
11 import org.apache.jackrabbit.spi.RepositoryServiceFactory;
12
13 /** A customised {@link RepositoryFactory} access a remote DAVEX service. */
14 public class ClientDavexRepositoryFactory implements RepositoryFactory {
15 public final static String JACKRABBIT_DAVEX_URI = ClientDavexRepositoryServiceFactory.PARAM_REPOSITORY_URI;
16 public final static String JACKRABBIT_REMOTE_DEFAULT_WORKSPACE = ClientDavexRepositoryServiceFactory.PARAM_WORKSPACE_NAME_DEFAULT;
17
18 @SuppressWarnings("rawtypes")
19 @Override
20 public Repository getRepository(Map parameters) throws RepositoryException {
21 RepositoryServiceFactory repositoryServiceFactory = new ClientDavexRepositoryServiceFactory();
22 return RepositoryImpl
23 .create(new Jcr2spiRepositoryFactory.RepositoryConfigImpl(repositoryServiceFactory, parameters));
24 }
25
26 }