Package com.gentics.api.lib.expressionparser

Examples of com.gentics.api.lib.expressionparser.EvaluableExpression.evaluate()


    ExpressionParser expressionParser = ExpressionParser.getInstance();
    try {
      EvaluableExpression expression = (EvaluableExpression) expressionParser.parse(expressionString);
      ExpressionQueryRequest expressionQueryRequest = new ExpressionQueryRequest(
          new PropertyResolver(resolvable), new HashMap<Object, Object>(0));
      result = (String) expression.evaluate(expressionQueryRequest, ExpressionEvaluator.OBJECTTYPE_STRING);
    } catch (ExpressionParserException e) {
      LOGGER.error("Error while evaluating the expression (" + expressionString + ") with the base resolvable ("
          + resolvable + ")", e);
    } catch (ParserException e) {
      LOGGER.error("Error parsing the expression (" + expressionString + ").", e);
View Full Code Here


      final HashMap<String, EvaluableExpression> attributesDefintion, final AttributeCallback attributeCallback) {
    int changes = 0;
    for (String attributeName : attributesDefintion.keySet()) {
      EvaluableExpression expression = attributesDefintion.get(attributeName);
      try {
        String result = (String) expression.evaluate(
          expressionQueryRequest,
          ExpressionEvaluator.OBJECTTYPE_STRING);
        if (result != null && !result.equals("")) {
          attributeCallback.invokeCallback(html, attributeName.toLowerCase(), result);
          changes++;
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.