]> git.argeo.org Git - lgpl/argeo-commons.git/blob - RepoConf.java
111c86c4abe1613d752347713ae748e2df07c264
[lgpl/argeo-commons.git] / RepoConf.java
1 package org.argeo.cms.internal.kernel;
2
3 import org.argeo.osgi.metatype.EnumAD;
4 import org.argeo.osgi.metatype.EnumOCD;
5
6 /** JCR repository configuration */
7 enum RepoConf implements EnumAD {
8 /** Repository type */
9 type("localfs"),
10 /** Default workspace */
11 @Deprecated 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 @Deprecated 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
39 /** The default value. */
40 private Object def;
41 private String oid;
42
43 RepoConf(String oid, Object def) {
44 this.oid = oid;
45 this.def = def;
46 }
47
48 RepoConf(Object def) {
49 this.def = def;
50 }
51
52 public Object getDefault() {
53 return def;
54 }
55
56 @Override
57 public String getID() {
58 if (oid != null)
59 return oid;
60 return EnumAD.super.getID();
61 }
62
63 public static class OCD extends EnumOCD<RepoConf> {
64 public OCD(String locale) {
65 super(RepoConf.class, locale);
66 }
67 }
68
69 }