Package com.netscape.cmscore.ldap
Class LdapSimpleExpression
- java.lang.Object
-
- com.netscape.cmscore.ldap.LdapSimpleExpression
-
- All Implemented Interfaces:
ILdapExpression
public class LdapSimpleExpression extends java.lang.Object implements ILdapExpression
This class represents an expression of the form var = val, var != val, var < val, var > val, var <= val, var >= val. Expressions are used as predicates for publishing rule selection.- Version:
- $Revision$, $Date$
- Author:
- mzhao
-
-
Field Summary
Fields Modifier and Type Field Description static LdapSimpleExpression
NULL_EXPRESSION
static char
WILDCARD_CHAR
-
Constructor Summary
Constructors Constructor Description LdapSimpleExpression(java.lang.String var, int op, java.lang.String val)
LdapSimpleExpression(java.lang.String prefix, java.lang.String var, int op, java.lang.String val)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluate(SessionContext sc)
Evaluate the Expression.boolean
evaluate(IRequest req)
Evaluate the Expression.static ILdapExpression
parse(java.lang.String input)
java.lang.String
toString()
Convert to a string.
-
-
-
Field Detail
-
WILDCARD_CHAR
public static final char WILDCARD_CHAR
- See Also:
- Constant Field Values
-
NULL_EXPRESSION
public static LdapSimpleExpression NULL_EXPRESSION
-
-
Method Detail
-
parse
public static ILdapExpression parse(java.lang.String input) throws ELdapException
- Throws:
ELdapException
-
evaluate
public boolean evaluate(SessionContext sc) throws ELdapException
Description copied from interface:ILdapExpression
Evaluate the Expression.- Specified by:
evaluate
in interfaceILdapExpression
- Parameters:
sc
- The SessionContext on which we are applying the condition.- Returns:
- The return value.
- Throws:
ELdapException
-
evaluate
public boolean evaluate(IRequest req) throws ELdapException
Description copied from interface:ILdapExpression
Evaluate the Expression.- Specified by:
evaluate
in interfaceILdapExpression
- Parameters:
req
- The PKIRequest on which we are applying the condition.- Returns:
- The return value.
- Throws:
ELdapException
-
toString
public java.lang.String toString()
Description copied from interface:ILdapExpression
Convert to a string.- Specified by:
toString
in interfaceILdapExpression
- Overrides:
toString
in classjava.lang.Object
- Returns:
- String representation of expression.
-
-