org.nuxeo.ecm.directory.ldap
Class LDAPFilterMatcher
java.lang.Object
org.nuxeo.ecm.directory.ldap.LDAPFilterMatcher
public class LDAPFilterMatcher
- extends Object
Helper class to parse and evaluate if a LDAP filter expression matches a
fetched LDAP entry.
This is done by recursively evaluating the abstract syntax tree of the
expression as parsed by an apache directory shared method.
- Author:
- Olivier Grisel
Method Summary |
boolean |
match(Attributes attributes,
String filter)
Check whether a raw string filter expression matches on the given LDAP
entry. |
match
public boolean match(Attributes attributes,
String filter)
throws DirectoryException
- Check whether a raw string filter expression matches on the given LDAP
entry.
- Parameters:
attributes
- the ldap entry to matchfilter
- a raw string filter expression (eg.
(!(&(attr1=*)(attr2=value2)(attr3=val*))) )
- Returns:
- true if the ldap entry matches the filter
- Throws:
DirectoryException
- if the filter is not a valid LDAP filter
Copyright © 2011 Nuxeo SAS. All Rights Reserved.