Since I've started with LdapTemplate, I'm wondering why there's no
"lookup(String dn, String [] attributes, AttributesMapper mapper)" method.
Let's take a real case, each time I use the lookup method, all
attributes of the entry are retrieved.
In my LDAP, each entry has about 20 or 30 attributes, it's a real mess
if I only need the uid.
Here are the modifications to add these methods :
LdapOperations.java :
LdapTemplate.java :Code:public Object lookup(final String dn, final String [] attributes, final AttributesMapper mapper); public Object lookup(final String dn, final String [] attributes, final ContextMapper mapper); public Object lookup(final Name dn, final String [] attributes, final AttributesMapper mapper); public Object lookup(final Name dn, final String [] attributes, final ContextMapper mapper);
Implement the new methods and modify the old ones to call these with a
null attributes parameter.
Tell me if it's something that could be done, I think it's a real
performance improvement.


Reply With Quote