Examples of ExpressionNode


Examples of org.pirkaengine.core.template.ExpressionNode

    @Test
    public void createViewModel_condition_with_expression() {
        XhtmlTemplate template = new XhtmlTemplate("test");
        StartTagNode start = new StartTagNode("div", "prk:if", "cond");
        EndTagNode end = new EndTagNode("div");
        ExpressionNode node = new ExpressionNode("name");
        template.stack(new ConditionNode(start, end, new Node[] { node }));
        Map<String, Object> expected = new HashMap<String, Object>();
        expected.put("cond", XhtmlTemplate.NULL_VALUE);
        expected.put("name", XhtmlTemplate.NULL_VALUE);
        Assert.assertEquals(expected, template.createViewModel());
View Full Code Here

Examples of org.springframework.data.mongodb.core.spel.ExpressionNode

    Assert.notNull(context, "AggregationOperationContext must not be null!");
    Assert.notNull(params, "Parameters must not be null!");

    SpelExpression spelExpression = (SpelExpression) PARSER.parseExpression(expression);
    ExpressionState state = new ExpressionState(new StandardEvaluationContext(params), CONFIG);
    ExpressionNode node = ExpressionNode.from(spelExpression.getAST(), state);

    return transform(new AggregationExpressionTransformationContext<ExpressionNode>(node, null, null, context));
  }
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.