import java.util.Dictionary;
import java.util.List;
-import org.argeo.naming.LdapAttrs;
+import org.argeo.util.naming.LdapAttrs;
import org.osgi.service.useradmin.Authorization;
import org.osgi.service.useradmin.Role;
import org.osgi.service.useradmin.User;
final static String extractDisplayName(User user) {
Dictionary<String, Object> props = user.getProperties();
- Object displayName = props.get(LdapAttrs.displayName);
+ Object displayName = props.get(LdapAttrs.displayName.name());
if (displayName == null)
- displayName = props.get(LdapAttrs.cn);
+ displayName = props.get(LdapAttrs.cn.name());
if (displayName == null)
- displayName = props.get(LdapAttrs.uid);
+ displayName = props.get(LdapAttrs.uid.name());
if (displayName == null)
displayName = user.getName();
if (displayName == null)
- throw new UserDirectoryException("Cannot set display name for " + user);
+ throw new IllegalStateException("Cannot set display name for " + user);
return displayName.toString();
}
}