Package com.gentics.api.lib.expressionparser

Examples of com.gentics.api.lib.expressionparser.ExpressionQueryRequest


  private static String evaluateString(final String expressionString, final Resolvable resolvable) {
    String result = null;
    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);
View Full Code Here


    logger.debug("Handling: " + html);
    StringBuffer result = new StringBuffer(html);
    int changes = 0;
    Map<String, Object> attributes = parseAttributes(attributeString);

    ExpressionQueryRequest expressionQueryRequest = prepareQueryRequest(bean, attributes);

    changes += processAttributes(result, expressionQueryRequest, addAttributesIfEmpty, addAttributeCallback);
    changes += processAttributes(result, expressionQueryRequest, replaceAttributes, replaceAttributeCallback);

    if (changes > 0) {
View Full Code Here

    CRResolvableBean resolvable = new CRResolvableBean();
    resolvable.setAttrMap(attributes);
    resolvable.set("object", bean);
    resolvable.set("page", bean);
    PropertyResolver resolver = new PropertyResolver(resolvable);
    return new ExpressionQueryRequest(resolver, new HashMap<String, String>(0));

  }
View Full Code Here

TOP

Related Classes of com.gentics.api.lib.expressionparser.ExpressionQueryRequest

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.