]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.util/src/org/argeo/util/naming/LdapObjs.java
Revert start level changes
[lgpl/argeo-commons.git] / org.argeo.util / src / org / argeo / util / naming / LdapObjs.java
1 package org.argeo.util.naming;
2
3 import java.util.function.Supplier;
4
5 import javax.xml.namespace.QName;
6
7 import org.argeo.util.internal.DisplayQName;
8
9 /**
10 * Standard LDAP object classes as per
11 * <a href="https://www.ldap.com/ldap-oid-reference">https://www.ldap.com/ldap-
12 * oid-reference</a>
13 */
14 public enum LdapObjs implements SpecifiedName, Supplier<String> {
15 account("0.9.2342.19200300.100.4.5", "RFC 4524"),
16 /** */
17 document("0.9.2342.19200300.100.4.6", "RFC 4524"),
18 /** */
19 room("0.9.2342.19200300.100.4.7", "RFC 4524"),
20 /** */
21 documentSeries("0.9.2342.19200300.100.4.9", "RFC 4524"),
22 /** */
23 domain("0.9.2342.19200300.100.4.13", "RFC 4524"),
24 /** */
25 rFC822localPart("0.9.2342.19200300.100.4.14", "RFC 4524"),
26 /** */
27 domainRelatedObject("0.9.2342.19200300.100.4.17", "RFC 4524"),
28 /** */
29 friendlyCountry("0.9.2342.19200300.100.4.18", "RFC 4524"),
30 /** */
31 simpleSecurityObject("0.9.2342.19200300.100.4.19", "RFC 4524"),
32 /** */
33 uidObject("1.3.6.1.1.3.1", "RFC 4519"),
34 /** */
35 extensibleObject("1.3.6.1.4.1.1466.101.120.111", "RFC 4512"),
36 /** */
37 dcObject("1.3.6.1.4.1.1466.344", "RFC 4519"),
38 /** */
39 authPasswordObject("1.3.6.1.4.1.4203.1.4.7", "RFC 3112"),
40 /** */
41 namedObject("1.3.6.1.4.1.5322.13.1.1", "draft-howard-namedobject"),
42 /** */
43 inheritableLDAPSubEntry("1.3.6.1.4.1.7628.5.6.1.1", "draft-ietf-ldup-subentry"),
44 /** */
45 top("2.5.6.0", "RFC 4512"),
46 /** */
47 alias("2.5.6.1", "RFC 4512"),
48 /** */
49 country("2.5.6.2", "RFC 4519"),
50 /** */
51 locality("2.5.6.3", "RFC 4519"),
52 /** */
53 organization("2.5.6.4", "RFC 4519"),
54 /** */
55 organizationalUnit("2.5.6.5", "RFC 4519"),
56 /** */
57 person("2.5.6.6", "RFC 4519"),
58 /** */
59 organizationalPerson("2.5.6.7", "RFC 4519"),
60 /** */
61 organizationalRole("2.5.6.8", "RFC 4519"),
62 /** */
63 groupOfNames("2.5.6.9", "RFC 4519"),
64 /** */
65 residentialPerson("2.5.6.10", "RFC 4519"),
66 /** */
67 applicationProcess("2.5.6.11", "RFC 4519"),
68 /** */
69 device("2.5.6.14", "RFC 4519"),
70 /** */
71 strongAuthenticationUser("2.5.6.15", "RFC 4523"),
72 /** */
73 certificationAuthority("2.5.6.16", "RFC 4523"),
74 // /** Should be certificationAuthority-V2 */
75 // certificationAuthority_V2("2.5.6.16.2", "RFC 4523") {
76 // },
77 /** */
78 groupOfUniqueNames("2.5.6.17", "RFC 4519"),
79 /** */
80 userSecurityInformation("2.5.6.18", "RFC 4523"),
81 /** */
82 cRLDistributionPoint("2.5.6.19", "RFC 4523"),
83 /** */
84 pkiUser("2.5.6.21", "RFC 4523"),
85 /** */
86 pkiCA("2.5.6.22", "RFC 4523"),
87 /** */
88 deltaCRL("2.5.6.23", "RFC 4523"),
89 /** */
90 subschema("2.5.20.1", "RFC 4512"),
91 /** */
92 ldapSubEntry("2.16.840.1.113719.2.142.6.1.1", "draft-ietf-ldup-subentry"),
93 /** */
94 changeLogEntry("2.16.840.1.113730.3.2.1", "draft-good-ldap-changelog"),
95 /** */
96 inetOrgPerson("2.16.840.1.113730.3.2.2", "RFC 2798"),
97 /** */
98 referral("2.16.840.1.113730.3.2.6", "RFC 3296"),
99
100 // RFC 2307bis (partial)
101 /** */
102 posixAccount("1.3.6.1.1.1.2.0", "RFC 2307bis"),
103 /** */
104 posixGroup("1.3.6.1.1.1.2.2", "RFC 2307bis"),
105
106 //
107 ;
108
109 /** MUST be equal to ContentRepository LDAP namespace. */
110 final static String LDAP_NAMESPACE_URI = "http://www.argeo.org/ns/ldap";
111 /** MUST be equal to ContentRepository LDAP prefix. */
112 final static String LDAP_DEFAULT_PREFIX = "ldap";
113
114 private final String oid, spec;
115 private final QName value;
116
117 private LdapObjs(String oid, String spec) {
118 this.oid = oid;
119 this.spec = spec;
120 this.value = new DisplayQName(LDAP_NAMESPACE_URI, name(), LDAP_DEFAULT_PREFIX);
121 }
122
123 public QName qName() {
124 return value;
125 }
126
127 public String getOid() {
128 return oid;
129 }
130
131 public String getSpec() {
132 return spec;
133 }
134
135 @Deprecated
136 public String property() {
137 return get();
138 }
139
140 @Override
141 public String get() {
142 return LdapObjs.LDAP_DEFAULT_PREFIX + ":" + name();
143 }
144
145 }