private boolean evalReportCondition(ElementVisitEvent visitEvent, String condition) { MVELExpressionEvaluator conditionEval = new MVELExpressionEvaluator(); conditionEval.setExpression(condition); return conditionEval.eval(visitEvent.getResourceConfig()); }
public boolean consumes(Object object) { if (keyExtractor.getExpression().indexOf(object.toString()) != -1) { return true; } return false; } }
public Object getValue(final Object contextObject) throws ExpressionEvaluationException { return exec(contextObject); }
public Object decode(String data) throws DataDecodeException { MVELExpressionEvaluator expressionEvaluator = new MVELExpressionEvaluator(); expressionEvaluator.setExpression(data); return expressionEvaluator; } }
expressionEvaluator = new MVELExpressionEvaluator(); expressionEvaluator.setExpression(expression); bindingType = String.class; expressionEvaluator.setToType(bindingType);
private MapBindingWiringVisitor(String bindKeyField, String mapBindingKey) { keyExtractor.setExpression(RECORD_BEAN + "." + bindKeyField); this.mapBindingKey = mapBindingKey; }
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); if(baseDecoder instanceof Configurable) { ((Configurable)baseDecoder).setConfiguration(config); } } }
private Long getStart(BeanContext beanContext) { if(start == null && startExpression == null) { return DEFAULT_START_INDEX; } else if(start != null) { return start; } else { Object result = startExpression.getValue(beanContext.getBeanMap()); if(!(result instanceof Long || result instanceof Integer)) { throw new SmooksException("The start expression must result in a Integer or a Long"); } return new Long(result.toString()); } }
public ResultsetRowSelector setWhereClause(String whereClause) { AssertArgument.isNotNullAndNotEmpty(whereClause, "whereClause"); this.whereEvaluator = new MVELExpressionEvaluator(); this.whereEvaluator.setExpression(whereClause); return this; }
public void count(ExecutionContext executionContext, Fragment source) { BeanContext beanContext = executionContext.getBeanContext(); Long value = (Long) beanContext.getBean(beanId); if(value == null || (resetCondition != null && resetCondition.eval(beanContext.getBeanMap()))) { value = getStart(beanContext); } else { int amount = getAmount(beanContext); if(countDirection == CountDirection.INCREMENT) { value = value + amount; } else { value = value - amount; } } beanContext.addBean(beanId, value, source); }
public Object decode(String data) throws DataDecodeException { MVELExpressionEvaluator expressionEvaluator = new MVELExpressionEvaluator(); expressionEvaluator.setExpression(data); return expressionEvaluator; } }
expressionEvaluator = new MVELExpressionEvaluator(); expressionEvaluator.setExpression(expression); bindingType = String.class; expressionEvaluator.setToType(bindingType);
private MapBindingWiringVisitor(String bindKeyField, String mapBindingKey) { keyExtractor.setExpression(RECORD_BEAN + "." + bindKeyField); this.mapBindingKey = mapBindingKey; }
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); if(baseDecoder instanceof Configurable) { ((Configurable)baseDecoder).setConfiguration(config); } } }
private Long getStart(BeanContext beanContext) { if(start == null && startExpression == null) { return DEFAULT_START_INDEX; } else if(start != null) { return start; } else { Object result = startExpression.getValue(beanContext.getBeanMap()); if(!(result instanceof Long || result instanceof Integer)) { throw new SmooksException("The start expression must result in a Integer or a Long"); } return new Long(result.toString()); } }
public void setCloseOnCondition(String closeOnCondition) { AssertArgument.isNotNullAndNotEmpty(closeOnCondition, "closeOnCondition"); this.closeOnCondition = new MVELExpressionEvaluator(); this.closeOnCondition.setExpression(closeOnCondition); }
public void count(ExecutionContext executionContext, Fragment source) { BeanContext beanContext = executionContext.getBeanContext(); Long value = (Long) beanContext.getBean(beanId); if(value == null || (resetCondition != null && resetCondition.eval(beanContext.getBeanMap()))) { value = getStart(beanContext); } else { int amount = getAmount(beanContext); if(countDirection == CountDirection.INCREMENT) { value = value + amount; } else { value = value - amount; } } beanContext.addBean(beanId, value, source); }
private boolean evalReportCondition(String condition) { MVELExpressionEvaluator conditionEval = new MVELExpressionEvaluator(); conditionEval.setExpression(condition); return conditionEval.eval(configMapping.getResourceConfig()); }
public Object decode(String data) throws DataDecodeException { MVELExpressionEvaluator expressionEvaluator = new MVELExpressionEvaluator(); expressionEvaluator.setExpression(data); return expressionEvaluator; } }
expressionEvaluator = new MVELExpressionEvaluator(); expressionEvaluator.setExpression(expression); bindingType = String.class; expressionEvaluator.setToType(bindingType);