1 package org
.argeo
.cms
.osgi
.useradmin
;
3 import javax
.naming
.ldap
.LdapName
;
5 import org
.argeo
.api
.acr
.ldap
.LdapAttr
;
6 import org
.argeo
.cms
.auth
.UserAdminUtils
;
7 import org
.argeo
.cms
.directory
.ldap
.AbstractLdapDirectory
;
8 import org
.argeo
.cms
.directory
.ldap
.DefaultLdapEntry
;
9 import org
.argeo
.cms
.util
.LangUtils
;
11 /** Directory user implementation */
12 class LdifUser
extends DefaultLdapEntry
implements CmsOsgiUser
{
13 LdifUser(AbstractLdapDirectory userAdmin
, LdapName dn
) {
18 public String
getName() {
19 return getDn().toString();
23 public int getType() {
27 public String
getDisplayName() {
28 String dName
= getPropertyAsString(LdapAttr
.displayName
);
29 if (LangUtils
.isEmpty(dName
))
30 dName
= getPropertyAsString(LdapAttr
.cn
);
31 if (LangUtils
.isEmpty(dName
))
32 dName
= getPropertyAsString(LdapAttr
.uid
);
33 if (LangUtils
.isEmpty(dName
))
34 dName
= UserAdminUtils
.getUserLocalId(getName());