Package org.dogtagpki.legacy.core.policy
Class SimpleExpression
- java.lang.Object
-
- org.dogtagpki.legacy.core.policy.SimpleExpression
-
- All Implemented Interfaces:
IExpression
public class SimpleExpression extends java.lang.Object implements IExpression
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 policy selection.- Version:
- $Revision$, $Date$
- Author:
- kanda
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
logger
static SimpleExpression
NULL_EXPRESSION
static char
WILDCARD_CHAR
-
Constructor Summary
Constructors Constructor Description SimpleExpression(java.lang.String var, int op, java.lang.String val)
SimpleExpression(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(IRequest req)
Evaluate the Expression.static IExpression
parse(java.lang.String input)
java.lang.String
toString()
Convert to a string.
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
WILDCARD_CHAR
public static final char WILDCARD_CHAR
- See Also:
- Constant Field Values
-
NULL_EXPRESSION
public static SimpleExpression NULL_EXPRESSION
-
-
Method Detail
-
parse
public static IExpression parse(java.lang.String input) throws EPolicyException
- Throws:
EPolicyException
-
evaluate
public boolean evaluate(IRequest req) throws EPolicyException
Description copied from interface:IExpression
Evaluate the Expression.- Specified by:
evaluate
in interfaceIExpression
- Parameters:
req
- The PKIRequest on which we are applying the condition.- Returns:
- The return value.
- Throws:
EPolicyException
-
toString
public java.lang.String toString()
Description copied from interface:IExpression
Convert to a string.- Specified by:
toString
in interfaceIExpression
- Overrides:
toString
in classjava.lang.Object
-
-