Package org.milyn.expression

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


        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

            reportDetail = executionContextState;
        }
    }

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

          }
          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

        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

        return this;
    }

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

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

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

                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

    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

    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

Related Classes of org.milyn.expression.MVELExpressionEvaluator

Copyright © 2018 www.massapicom. 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.