Fixed LDAP-107: Setting returningObj for ContextMapper handlers in search

http://jira.springframework.org/browse/LDAP-107
This commit is contained in:
Ulrik Sandberg
2008-04-29 16:15:44 +00:00
parent 22dac98e35
commit d1a78c9355

View File

@@ -346,8 +346,12 @@ public class LdapTemplate implements LdapOperations, InitializingBean {
public void search(Name base, String filter,
NameClassPairCallbackHandler handler) {
search(base, filter, getDefaultSearchControls(DEFAULT_SEARCH_SCOPE,
DONT_RETURN_OBJ_FLAG, ALL_ATTRIBUTES), handler);
SearchControls controls = getDefaultSearchControls(DEFAULT_SEARCH_SCOPE,
DONT_RETURN_OBJ_FLAG, ALL_ATTRIBUTES);
if (handler instanceof ContextMapperCallbackHandler) {
assureReturnObjFlagSet(controls);
}
search(base, filter, controls, handler);
}
/*
@@ -358,8 +362,12 @@ public class LdapTemplate implements LdapOperations, InitializingBean {
public void search(String base, String filter,
NameClassPairCallbackHandler handler) {
search(base, filter, getDefaultSearchControls(DEFAULT_SEARCH_SCOPE,
DONT_RETURN_OBJ_FLAG, ALL_ATTRIBUTES), handler);
SearchControls controls = getDefaultSearchControls(DEFAULT_SEARCH_SCOPE,
DONT_RETURN_OBJ_FLAG, ALL_ATTRIBUTES);
if (handler instanceof ContextMapperCallbackHandler) {
assureReturnObjFlagSet(controls);
}
search(base, filter, controls, handler);
}
/*