Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.directory.ldap
Class LDAPFilterMatcher

java.lang.Object
  extended by 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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 match
filter - 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

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.