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 LdapSimpleExpressionNULL_EXPRESSIONstatic charWILDCARD_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 booleanevaluate(SessionContext sc)Evaluate the Expression.booleanevaluate(IRequest req)Evaluate the Expression.static ILdapExpressionparse(java.lang.String input)java.lang.StringtoString()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:ILdapExpressionEvaluate the Expression.- Specified by:
evaluatein 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:ILdapExpressionEvaluate the Expression.- Specified by:
evaluatein 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:ILdapExpressionConvert to a string.- Specified by:
toStringin interfaceILdapExpression- Overrides:
toStringin classjava.lang.Object- Returns:
- String representation of expression.
-
-