public class MVELConstraintBuilder extends Object implements ConstraintBuilder
| Modifier and Type | Class and Description |
|---|---|
static class |
MVELConstraintBuilder.BooleanConversionHandler |
static class |
MVELConstraintBuilder.StringCoercionCompatibilityEvaluator |
| Modifier and Type | Field and Description |
|---|---|
protected static Set<String> |
MVEL_OPERATORS |
static boolean |
USE_MVEL_EXPRESSION |
| Constructor and Description |
|---|
MVELConstraintBuilder() |
| Modifier and Type | Method and Description |
|---|---|
org.drools.core.base.mvel.MVELCompilationUnit |
buildCompilationUnit(RuleBuildContext context,
org.drools.core.rule.Declaration[] previousDeclarations,
org.drools.core.rule.Declaration[] localDeclarations,
PredicateDescr predicateDescr,
AnalysisResult analysis) |
org.drools.core.base.mvel.MVELCompilationUnit |
buildCompilationUnit(RuleBuildContext context,
org.drools.core.rule.Pattern pattern,
String expression,
Map<String,OperatorDescr> aliases) |
org.drools.core.spi.Constraint |
buildLiteralConstraint(RuleBuildContext context,
org.drools.core.rule.Pattern pattern,
org.drools.core.base.ValueType vtype,
org.drools.core.spi.FieldValue field,
String expression,
String leftValue,
String operator,
String rightValue,
org.drools.core.spi.InternalReadAccessor extractor,
LiteralRestrictionDescr restrictionDescr,
Map<String,OperatorDescr> aliases) |
org.drools.core.spi.Evaluator |
buildLiteralEvaluator(RuleBuildContext context,
org.drools.core.spi.InternalReadAccessor extractor,
LiteralRestrictionDescr literalRestrictionDescr,
org.drools.core.base.ValueType vtype) |
org.drools.core.spi.Constraint |
buildMvelConstraint(Collection<String> packageNames,
String expression,
org.drools.core.rule.Declaration[] declarations,
org.drools.core.base.EvaluatorWrapper[] operators,
org.drools.core.base.mvel.MVELCompilationUnit compilationUnit,
org.drools.core.util.index.IndexUtil.ConstraintType constraintType,
org.drools.core.rule.Declaration indexingDeclaration,
org.drools.core.spi.InternalReadAccessor extractor,
boolean isUnification) |
org.drools.core.spi.Constraint |
buildMvelConstraint(String packageName,
String expression,
org.drools.core.rule.Declaration[] declarations,
org.drools.core.base.EvaluatorWrapper[] operators,
org.drools.core.base.mvel.MVELCompilationUnit compilationUnit,
boolean isDynamic) |
org.drools.core.spi.Constraint |
buildVariableConstraint(RuleBuildContext context,
org.drools.core.rule.Pattern pattern,
String expression,
org.drools.core.rule.Declaration[] declarations,
String leftValue,
OperatorDescr operatorDescr,
String rightValue,
org.drools.core.spi.InternalReadAccessor extractor,
org.drools.core.rule.Declaration requiredDeclaration,
RelationalExprDescr relDescr,
Map<String,OperatorDescr> aliases) |
org.drools.core.spi.Evaluator |
getEvaluator(RuleBuildContext context,
BaseDescr descr,
org.drools.core.base.ValueType valueType,
String evaluatorString,
boolean isNegated,
String parameters,
org.drools.core.base.evaluators.EvaluatorDefinition.Target left,
org.drools.core.base.evaluators.EvaluatorDefinition.Target right) |
protected static String |
getNormalizeDate(org.drools.core.spi.FieldValue field) |
org.drools.core.base.evaluators.EvaluatorDefinition.Target |
getRightTarget(org.drools.core.spi.InternalReadAccessor extractor) |
boolean |
isMvelOperator(String operator) |
protected static String |
normalizeEmptyKeyword(String expr,
String operator) |
protected static String |
normalizeMVELLiteralExpression(org.drools.core.base.ValueType vtype,
org.drools.core.spi.FieldValue field,
String expr,
String leftValue,
String operator,
String rightValue,
LiteralRestrictionDescr restrictionDescr) |
protected static String |
normalizeMVELVariableExpression(String expr,
String leftValue,
String rightValue,
RelationalExprDescr relDescr) |
protected static String |
normalizeStringOperator(String leftValue,
String rightValue,
LiteralRestrictionDescr restrictionDescr) |
protected static String |
resolveUnificationAmbiguity(String expr,
org.drools.core.rule.Declaration[] declrations,
String leftValue,
String rightValue) |
boolean |
useMvelExpression() |
org.drools.core.base.EvaluatorWrapper |
wrapEvaluator(org.drools.core.spi.Evaluator evaluator,
org.drools.core.rule.Declaration left,
org.drools.core.rule.Declaration right) |
public static final boolean USE_MVEL_EXPRESSION
public boolean isMvelOperator(String operator)
isMvelOperator in interface ConstraintBuilderpublic boolean useMvelExpression()
public org.drools.core.spi.Constraint buildVariableConstraint(RuleBuildContext context, org.drools.core.rule.Pattern pattern, String expression, org.drools.core.rule.Declaration[] declarations, String leftValue, OperatorDescr operatorDescr, String rightValue, org.drools.core.spi.InternalReadAccessor extractor, org.drools.core.rule.Declaration requiredDeclaration, RelationalExprDescr relDescr, Map<String,OperatorDescr> aliases)
buildVariableConstraint in interface ConstraintBuilderpublic org.drools.core.spi.Constraint buildMvelConstraint(String packageName, String expression, org.drools.core.rule.Declaration[] declarations, org.drools.core.base.EvaluatorWrapper[] operators, org.drools.core.base.mvel.MVELCompilationUnit compilationUnit, boolean isDynamic)
buildMvelConstraint in interface ConstraintBuilderpublic org.drools.core.spi.Constraint buildMvelConstraint(Collection<String> packageNames, String expression, org.drools.core.rule.Declaration[] declarations, org.drools.core.base.EvaluatorWrapper[] operators, org.drools.core.base.mvel.MVELCompilationUnit compilationUnit, org.drools.core.util.index.IndexUtil.ConstraintType constraintType, org.drools.core.rule.Declaration indexingDeclaration, org.drools.core.spi.InternalReadAccessor extractor, boolean isUnification)
buildMvelConstraint in interface ConstraintBuilderpublic org.drools.core.spi.Constraint buildLiteralConstraint(RuleBuildContext context, org.drools.core.rule.Pattern pattern, org.drools.core.base.ValueType vtype, org.drools.core.spi.FieldValue field, String expression, String leftValue, String operator, String rightValue, org.drools.core.spi.InternalReadAccessor extractor, LiteralRestrictionDescr restrictionDescr, Map<String,OperatorDescr> aliases)
buildLiteralConstraint in interface ConstraintBuilderprotected static String resolveUnificationAmbiguity(String expr, org.drools.core.rule.Declaration[] declrations, String leftValue, String rightValue)
protected static String normalizeMVELLiteralExpression(org.drools.core.base.ValueType vtype, org.drools.core.spi.FieldValue field, String expr, String leftValue, String operator, String rightValue, LiteralRestrictionDescr restrictionDescr)
protected static String getNormalizeDate(org.drools.core.spi.FieldValue field)
protected static String normalizeStringOperator(String leftValue, String rightValue, LiteralRestrictionDescr restrictionDescr)
protected static String normalizeMVELVariableExpression(String expr, String leftValue, String rightValue, RelationalExprDescr relDescr)
public org.drools.core.spi.Evaluator buildLiteralEvaluator(RuleBuildContext context, org.drools.core.spi.InternalReadAccessor extractor, LiteralRestrictionDescr literalRestrictionDescr, org.drools.core.base.ValueType vtype)
buildLiteralEvaluator in interface ConstraintBuilderpublic org.drools.core.base.evaluators.EvaluatorDefinition.Target getRightTarget(org.drools.core.spi.InternalReadAccessor extractor)
getRightTarget in interface ConstraintBuilderpublic org.drools.core.spi.Evaluator getEvaluator(RuleBuildContext context, BaseDescr descr, org.drools.core.base.ValueType valueType, String evaluatorString, boolean isNegated, String parameters, org.drools.core.base.evaluators.EvaluatorDefinition.Target left, org.drools.core.base.evaluators.EvaluatorDefinition.Target right)
getEvaluator in interface ConstraintBuilderpublic org.drools.core.base.EvaluatorWrapper wrapEvaluator(org.drools.core.spi.Evaluator evaluator,
org.drools.core.rule.Declaration left,
org.drools.core.rule.Declaration right)
wrapEvaluator in interface ConstraintBuilderpublic org.drools.core.base.mvel.MVELCompilationUnit buildCompilationUnit(RuleBuildContext context, org.drools.core.rule.Pattern pattern, String expression, Map<String,OperatorDescr> aliases)
buildCompilationUnit in interface ConstraintBuilderpublic org.drools.core.base.mvel.MVELCompilationUnit buildCompilationUnit(RuleBuildContext context, org.drools.core.rule.Declaration[] previousDeclarations, org.drools.core.rule.Declaration[] localDeclarations, PredicateDescr predicateDescr, AnalysisResult analysis)
buildCompilationUnit in interface ConstraintBuilderCopyright © 2001–2017 JBoss by Red Hat. All rights reserved.