LDAP-263: authentication methods for LdapQuery. Documentation updated to reflect fluent API changes.

This commit is contained in:
Mattias Hellborg Arthursson
2013-09-24 16:55:54 +02:00
parent 7134d21391
commit 27682b0b53
18 changed files with 591 additions and 558 deletions

View File

@@ -32,6 +32,8 @@ import javax.naming.directory.Attributes;
import javax.naming.ldap.LdapName;
import java.util.List;
import static org.springframework.ldap.query.LdapQueryBuilder.query;
/**
* Default implementation of PersonDao. This implementation uses
* DirContextAdapter for managing attribute values. We use a ContextMapper
@@ -84,8 +86,9 @@ public class PersonDaoImpl implements PersonDao {
@Override
public List<Person> findAll() {
EqualsFilter filter = new EqualsFilter("objectclass", "person");
return ldapTemplate.search(LdapUtils.emptyLdapName(), filter.encode(), PERSON_CONTEXT_MAPPER);
return ldapTemplate.search(query()
.where("objectclass").is("person"),
PERSON_CONTEXT_MAPPER);
}
@Override