Examples of MVELExpressionEvaluator


Examples of org.milyn.expression.MVELExpressionEvaluator

  private DataDecoder baseDecoder;

  public void setConfiguration(Properties config) throws SmooksException {
    this.config = config;
   
    expression = new MVELExpressionEvaluator(config.getProperty(VALUE_PRE_PROCESSING));
    expression.setToType(String.class);
   
    String baseDecoderName = config.getProperty(BASE_DECODER);
    if(baseDecoderName != null) {
      baseDecoder = DataDecoder.Factory.create(baseDecoderName);
View Full Code Here

Examples of org.milyn.expression.MVELExpressionEvaluator

        return false;
    }

    private boolean evalReportCondition(ElementVisitEvent visitEvent, String condition) {
        MVELExpressionEvaluator conditionEval = new MVELExpressionEvaluator();
        conditionEval.setExpression(condition);
        return conditionEval.eval(visitEvent.getResourceConfig());
    }
View Full Code Here

Examples of org.milyn.expression.MVELExpressionEvaluator

            reportDetail = executionContextState;
        }
    }

    private boolean evalReportCondition(String condition) {
        MVELExpressionEvaluator conditionEval = new MVELExpressionEvaluator();
        conditionEval.setExpression(condition);
        return conditionEval.eval(configMapping.getResourceConfig());
    }
View Full Code Here

Examples of org.milyn.expression.MVELExpressionEvaluator

          }
          if(expression.startsWith("-=")) {
            expression = beanIdName + "." + property + " -" + expression.substring(2);
          }

          expressionEvaluator = new MVELExpressionEvaluator();
          expressionEvaluator.setExpression(expression);

          // If we can determine the target binding type, tell MVEL.
          // If there's a decoder (a typeAlias), we define a String var instead and leave decoding
          // to the decoder...
View Full Code Here

Examples of org.milyn.expression.MVELExpressionEvaluator

        return this;
    }

    public ResultsetRowSelector setWhereClause(String whereClause) {
        AssertArgument.isNotNullAndNotEmpty(whereClause, "whereClause");
        this.whereEvaluator = new MVELExpressionEvaluator();
        this.whereEvaluator.setExpression(whereClause);
        return this;
    }
View Full Code Here

Examples of org.milyn.expression.MVELExpressionEvaluator

        return this;
    }

    public void setCloseOnCondition(String closeOnCondition) {
        AssertArgument.isNotNullAndNotEmpty(closeOnCondition, "closeOnCondition");
        this.closeOnCondition = new MVELExpressionEvaluator();
        this.closeOnCondition.setExpression(closeOnCondition);
    }
View Full Code Here

Examples of org.milyn.expression.MVELExpressionEvaluator

          for(Parameter initValExpression : initValExpressions) {
            initValsExpressionString.append(initValExpression.getValue());
            initValsExpressionString.append("\n");
          }

          initValsExpression = new MVELExpressionEvaluator();
          initValsExpression.setExpression(initValsExpressionString.toString());
        }
    }
View Full Code Here

Examples of org.milyn.expression.MVELExpressionEvaluator

                if(rules.containsKey(ruleName)) {
                    logger.debug("Duplicate rule definition '" + ruleName + "' in MVEL rule file '" + ruleName + "'.  Ignoring duplicate.");
                    continue;
                }

                rules.put(ruleName, new MVELExpressionEvaluator().setExpression(ruleExpression));
            }
        }
    }
View Full Code Here

Examples of org.milyn.expression.MVELExpressionEvaluator

    protected static boolean visitBeforeAnnotationsOK(SmooksResourceConfiguration resourceConfig, ContentHandler contentHandler) {
        Class<? extends ContentHandler> handlerClass = contentHandler.getClass();
        VisitBeforeIf visitBeforeIf = handlerClass.getAnnotation(VisitBeforeIf.class);

        if(visitBeforeIf != null) {
            MVELExpressionEvaluator conditionEval = new MVELExpressionEvaluator();

            conditionEval.setExpression(visitBeforeIf.condition());
            return conditionEval.eval(resourceConfig);
        }

        return true;
    }
View Full Code Here

Examples of org.milyn.expression.MVELExpressionEvaluator

    protected static boolean visitAfterAnnotationsOK(SmooksResourceConfiguration resourceConfig, ContentHandler contentHandler) {
        Class<? extends ContentHandler> handlerClass = contentHandler.getClass();
        VisitAfterIf visitAfterIf = handlerClass.getAnnotation(VisitAfterIf.class);

        if(visitAfterIf != null) {
            MVELExpressionEvaluator conditionEval = new MVELExpressionEvaluator();

            conditionEval.setExpression(visitAfterIf.condition());
            return conditionEval.eval(resourceConfig);
        }

        return true;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.