0
내 목표는 주어진 객체 클래스에 의해 LDAP 서버에 정의 된 모든 속성을 검색하는 것입니다. 내가 지금까지했던 것은 :ldap의 특정 객체 클래스로 모든 속성 정의를 얻는 방법은 무엇입니까?
List<SearchResult> searchLdapUsers = searchLdapUsers(ldapConfig, null, null, null, null, null, 0);
if (searchLdapUsers != null && searchLdapUsers.size() > 0) {
for (SearchResult searchResult : searchLdapUsers) {
Attributes attrs = searchResult.getAttributes();
if (attrs != null) {
NamingEnumeration<? extends Attribute> all = attrs.getAll();
while (all.hasMoreElements()) {
Attribute attribute = (Attribute) all.nextElement();
hs.put(attribute.getID(), attribute.getID());
}
}
}
}
이 코드는 LDAP 서버에서 모든 사용자를 조회 및 속성의 정의를 얻을 것이다. 이것은 정상적으로 작동하지만 다수의 사용자에게 문제가 발생할 것입니다.
주어진 객체 클래스를 직접 찾고 내부의 모든 속성 정의를 가져 오는 다른 방법이 있습니까?
X-Y 문제인 것 같습니다. 당신이 해결하려고하는 실제 문제는 무엇입니까? – Roshith