Class ExpressionTransform
java.lang.Object
com.netflix.spinnaker.kork.expressions.ExpressionTransform
-
Constructor Summary
ConstructorsConstructorDescriptionExpressionTransform(org.springframework.expression.ParserContext parserContext, org.springframework.expression.ExpressionParser parser, Function<String, String> stringExpressionPreprocessor, Class<?>... typesToStringify) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringescapeSimpleExpression(String expression) Helper to escape a simple expression string Used to extract a simple expression when parsing failstransformList(List source, org.springframework.expression.EvaluationContext evaluationContext, ExpressionEvaluationSummary summary, Map<String, Object> additionalContext) transformMap(Map<String, Object> source, org.springframework.expression.EvaluationContext evaluationContext, ExpressionEvaluationSummary summary) Traverses and attempts to evaluate expressions Failures can either be INFO (for a simple unresolved expression) or ERROR when an exception is throwntransformString(String source, org.springframework.expression.EvaluationContext evaluationContext, ExpressionEvaluationSummary summary)
-
Constructor Details
-
ExpressionTransform
-
-
Method Details
-
escapeSimpleExpression
Helper to escape a simple expression string Used to extract a simple expression when parsing fails- Parameters:
expression- Expression to escape- Returns:
- escaped expression string
-
transformMap
public Map<String,Object> transformMap(Map<String, Object> source, org.springframework.expression.EvaluationContext evaluationContext, ExpressionEvaluationSummary summary) Traverses and attempts to evaluate expressions Failures can either be INFO (for a simple unresolved expression) or ERROR when an exception is thrown- Parameters:
source- Source object to apply SpEL transformations toevaluationContext- Context used during evaluation of source objectsummary- Summary of evaluation after all transformations are applied- Returns:
- the transformed source object
-
transformList
-
transformString
public String transformString(String source, org.springframework.expression.EvaluationContext evaluationContext, ExpressionEvaluationSummary summary)
-