org.knopflerfish.framework
Class LDAPExpr

java.lang.Object
  extended by org.knopflerfish.framework.LDAPExpr

public class LDAPExpr
extends java.lang.Object


Field Summary
static int AND
           
static int APPROX
           
 LDAPExpr[] args
           
 java.lang.String attrName
           
 java.lang.String attrValue
           
static int COMPLEX
           
static int EQ
           
static int GE
           
static int LE
           
static int NOT
           
 int operator
           
static int OR
           
static int SIMPLE
           
 
Constructor Summary
LDAPExpr(java.lang.String filter)
           
 
Method Summary
protected  boolean compare(java.lang.Object obj, int op, java.lang.String s, boolean matchCase)
          Private methods
 boolean evaluate(java.util.Dictionary p, boolean matchCase)
          Evaluate this LDAP filter.
 boolean isSimple(java.util.List keywords, java.util.List[] cache)
          Checks if this LDAP expression is "simple".
static boolean query(java.lang.String filter, java.util.Dictionary pd)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AND

public static final int AND
See Also:
Constant Field Values

OR

public static final int OR
See Also:
Constant Field Values

NOT

public static final int NOT
See Also:
Constant Field Values

EQ

public static final int EQ
See Also:
Constant Field Values

LE

public static final int LE
See Also:
Constant Field Values

GE

public static final int GE
See Also:
Constant Field Values

APPROX

public static final int APPROX
See Also:
Constant Field Values

COMPLEX

public static final int COMPLEX
See Also:
Constant Field Values

SIMPLE

public static final int SIMPLE
See Also:
Constant Field Values

operator

public int operator

args

public LDAPExpr[] args

attrName

public java.lang.String attrName

attrValue

public java.lang.String attrValue
Constructor Detail

LDAPExpr

public LDAPExpr(java.lang.String filter)
         throws InvalidSyntaxException
Throws:
InvalidSyntaxException
Method Detail

isSimple

public boolean isSimple(java.util.List keywords,
                        java.util.List[] cache)
Checks if this LDAP expression is "simple". The definition of a simple filter is: If the filter is found to be simple, the cache is filled with mappings from the provided keywords to lists of attribute values. The keyword-value-pairs are the ones that satisfy this expression, for the given keywords.

Parameters:
keywords - The keywords to look for.
cache - An array (indexed by the keyword indexes) of lists to fill in with values saturating this expression.
Returns:
true if this expression is simple, false otherwise.

query

public static boolean query(java.lang.String filter,
                            java.util.Dictionary pd)
                     throws InvalidSyntaxException
Throws:
InvalidSyntaxException

evaluate

public boolean evaluate(java.util.Dictionary p,
                        boolean matchCase)
Evaluate this LDAP filter.


compare

protected boolean compare(java.lang.Object obj,
                          int op,
                          java.lang.String s,
                          boolean matchCase)
Private methods


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object