View Javadoc
1   package org.argeo.cms.internal.jcr;
2   
3   import org.argeo.osgi.metatype.EnumAD;
4   import org.argeo.osgi.metatype.EnumOCD;
5   
6   /** JCR repository configuration */
7   public enum RepoConf implements EnumAD {
8   	/** Repository type */
9   	type("h2"),
10  	/** Default workspace */
11  	defaultWorkspace("main"),
12  	/** Database URL */
13  	dburl(null),
14  	/** Database user */
15  	dbuser(null),
16  	/** Database password */
17  	dbpassword(null),
18  
19  	/** The identifier (can be an URL locating the repo) */
20  	labeledUri(null),
21  	//
22  	// JACKRABBIT SPECIFIC
23  	//
24  	/** Maximum database pool size */
25  	maxPoolSize(10),
26  	/** Maximum cache size in MB */
27  	maxCacheMB(null),
28  	/** Bundle cache size in MB */
29  	bundleCacheMB(8),
30  	/** Extractor pool size */
31  	extractorPoolSize(0),
32  	/** Search cache size */
33  	searchCacheSize(1000),
34  	/** Max volatile index size */
35  	maxVolatileIndexSize(1048576),
36  	/** Cluster id (if appropriate configuration) */
37  	clusterId("default"),
38  	/** Indexes base path */
39  	indexesBase(null);
40  
41  	/** The default value. */
42  	private Object def;
43  	private String oid;
44  
45  	RepoConf(String oid, Object def) {
46  		this.oid = oid;
47  		this.def = def;
48  	}
49  
50  	RepoConf(Object def) {
51  		this.def = def;
52  	}
53  
54  	public Object getDefault() {
55  		return def;
56  	}
57  
58  	@Override
59  	public String getID() {
60  		if (oid != null)
61  			return oid;
62  		return EnumAD.super.getID();
63  	}
64  
65  	public static class OCD extends EnumOCD<RepoConf> {
66  		public OCD(String locale) {
67  			super(RepoConf.class, locale);
68  		}
69  	}
70  
71  }