]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.security.core/src/org/argeo/osgi/useradmin/LdifName.java
Fix URI when using 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 // Object classes
14 inetOrgPerson, organizationalPerson, person, groupOfNames, top;
15
16 public final static String PREFIX = "ldap:";
17
18 /** For use as XML name. */
19 public String property() {
20 return PREFIX + name();
21 }
22
23 public static LdifName local(String property) {
24 return LdifName.valueOf(property.substring(PREFIX.length()));
25 }
26 }