]> git.argeo.org Git - lgpl/argeo-commons.git/blob - client/ClientDavexRepositoryService.java
Prepare next development cycle
[lgpl/argeo-commons.git] / client / ClientDavexRepositoryService.java
1 package org.argeo.jackrabbit.client;
2
3 import javax.jcr.RepositoryException;
4
5 import org.apache.http.client.protocol.HttpClientContext;
6 import org.apache.http.protocol.HttpContext;
7 import org.apache.jackrabbit.spi.SessionInfo;
8 import org.apache.jackrabbit.spi2davex.BatchReadConfig;
9 import org.apache.jackrabbit.spi2davex.RepositoryServiceImpl;
10
11 /**
12 * Wrapper for {@link RepositoryServiceImpl} in order to access the underlying
13 * {@link HttpClientContext}.
14 */
15 public class ClientDavexRepositoryService extends RepositoryServiceImpl {
16
17 public ClientDavexRepositoryService(String jcrServerURI, BatchReadConfig batchReadConfig)
18 throws RepositoryException {
19 super(jcrServerURI, batchReadConfig);
20 }
21
22
23
24 // public ClientDavexRepositoryService(String jcrServerURI, String defaultWorkspaceName,
25 // BatchReadConfig batchReadConfig, int itemInfoCacheSize, ConnectionOptions connectionOptions)
26 // throws RepositoryException {
27 // super(jcrServerURI, defaultWorkspaceName, batchReadConfig, itemInfoCacheSize, connectionOptions);
28 // // TODO Auto-generated constructor stub
29 // }
30
31
32
33 // public ClientDavexRepositoryService(String jcrServerURI, String defaultWorkspaceName,
34 // BatchReadConfig batchReadConfig, int itemInfoCacheSize, int maximumHttpConnections)
35 // throws RepositoryException {
36 // super(jcrServerURI, defaultWorkspaceName, batchReadConfig, itemInfoCacheSize, maximumHttpConnections);
37 // }
38 //
39 // public ClientDavexRepositoryService(String jcrServerURI, String defaultWorkspaceName,
40 // BatchReadConfig batchReadConfig, int itemInfoCacheSize) throws RepositoryException {
41 // super(jcrServerURI, defaultWorkspaceName, batchReadConfig, itemInfoCacheSize);
42 // }
43
44 @Override
45 protected HttpContext getContext(SessionInfo sessionInfo) throws RepositoryException {
46 HttpClientContext result = HttpClientContext.create();
47 result.setAuthCache(new NonSerialBasicAuthCache());
48 return result;
49 }
50
51 }