LDAP search returns collection of Attributes objects
posted 9 years ago
Hello, I am new to LDAP. I am also new to accessing LDAP using JNDI. When using InitialLdapContext.search(base, filter, searchControls), an enumeration of SearchResults is returned. Each SearchResult contains precisely one Attributes (plural) object, which in turn might contain one or more Attribute (singular) objects. Why are the Attribute objects ordened in more than one Attributes objects? (and why are the Attributes objects wrapped in SearchResult objects?). I'd expect just an enumeration of Attribute (singular) objects.., without the nested hierarchy of Attributes objects/SearchResult objects...?? Although there must be a good reason for this design.