]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.security.core/src/org/argeo/osgi/useradmin/LdifName.java
Adapt default LDIF
[lgpl/argeo-commons.git] / org.argeo.security.core / src / org / argeo / osgi / useradmin / LdifName.java
1 package org.argeo.osgi.useradmin;
2
3 import javax.naming.ldap.LdapName;
4
5 /**
6 * Standard LDAP attributes and object classes leveraged in this implementation
7 * of user admin. Named {@link LdifName} in order not to collide with
8 * {@link LdapName}.
9 */
10 public enum LdifName {
11 // Attributes
12 dn, cn, sn, uid, mail, displayName, objectClass, userPassword, givenName, description,
13 // POSIX attributes
14 uidNumber, gidNumber, homeDirectory, loginShell, gecos,
15 // Object classes
16 posixAccount, inetOrgPerson, organizationalPerson, person, groupOfNames, groupOfUniqueNames, extensibleObject, top;
17
18 public final static String PREFIX = "ldap:";
19
20 /** For use as XML name. */
21 public String property() {
22 return PREFIX + name();
23 }
24
25 public static LdifName local(String property) {
26 return LdifName.valueOf(property.substring(PREFIX.length()));
27 }
28 }