org.knopflerfish.framework
Class LDAPExpr
java.lang.Object
org.knopflerfish.framework.LDAPExpr
public class LDAPExpr
- extends java.lang.Object
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 |
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
LDAPExpr
public LDAPExpr(java.lang.String filter)
throws InvalidSyntaxException
- Throws:
InvalidSyntaxException
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:
(name=value)
is simple if
name is a member of the provided keywords
,
and value does not contain a wildcard character;
(| EXPR+ )
is simple if all EXPR
expressions are simple;
- No other expressions are simple.
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