@Test void evaluateCompositeExpression() { ExpressionEvaluationSummary summary = new ExpressionEvaluationSummary(); StandardEvaluationContext evaluationContext = new ExpressionsSupport(Trigger.class) .buildEvaluationContext(new Pipeline(new Trigger(100)), true); String evaluated = new ExpressionTransform(parserContext, parser, Function.identity()) .transformString( "group:artifact:${trigger['buildNumber']}", evaluationContext, summary); assertThat(evaluated).isEqualTo("group:artifact:100"); assertThat(summary.getFailureCount()).isEqualTo(0); }
public String transformString( String source, EvaluationContext evaluationContext, ExpressionEvaluationSummary summary) { return (String) transform(source, evaluationContext, summary, Collections.emptyMap()); }
ExpressionTransform { public String transformString( String source, EvaluationContext evaluationContext, ExpressionEvaluationSummary summary) { return (String) transform(source, evaluationContext, summary, Collections.emptyMap()); } }
ExpressionTransform { public String transformString( String source, EvaluationContext evaluationContext, ExpressionEvaluationSummary summary) { return (String) transform(source, evaluationContext, summary, Collections.emptyMap()); } ExpressionTransform(
      ParserContext parserContext,
      ExpressionParser parser,
      Function<String, String> stringExpressionPreprocessor,
      Class<?>... typesToStringify); }
ExpressionTransform { public String transformString( String source, EvaluationContext evaluationContext, ExpressionEvaluationSummary summary) { return (String) transform(source, evaluationContext, summary, Collections.emptyMap()); } ExpressionTransform(
      ParserContext parserContext,
      ExpressionParser parser,
      Function<String, String> stringExpressionPreprocessor,
      Class<?>... typesToStringify); static String escapeSimpleExpression(String expression); Map<String, Object> transformMap(
      Map<String, Object> source,
      EvaluationContext evaluationContext,
      ExpressionEvaluationSummary summary); List transformList(
      List source,
      EvaluationContext evaluationContext,
      ExpressionEvaluationSummary summary,
      Map<String, Object> additionalContext); String transformString(
      String source, EvaluationContext evaluationContext, ExpressionEvaluationSummary summary); }
ExpressionTransform { public String transformString( String source, EvaluationContext evaluationContext, ExpressionEvaluationSummary summary) { return (String) transform(source, evaluationContext, summary, Collections.emptyMap()); } ExpressionTransform(
      ParserContext parserContext,
      ExpressionParser parser,
      Function<String, String> stringExpressionPreprocessor,
      Class<?>... typesToStringify); static String escapeSimpleExpression(String expression); Map<String, Object> transformMap(
      Map<String, Object> source,
      EvaluationContext evaluationContext,
      ExpressionEvaluationSummary summary); List transformList(
      List source,
      EvaluationContext evaluationContext,
      ExpressionEvaluationSummary summary,
      Map<String, Object> additionalContext); String transformString(
      String source, EvaluationContext evaluationContext, ExpressionEvaluationSummary summary);  }