Package org.apache.synapse.util
Class InlineExpressionUtil
- java.lang.Object
-
- org.apache.synapse.util.InlineExpressionUtil
-
public final class InlineExpressionUtil extends Object
Utils used to resolve expressions provided in inline texts in mediators
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckForInlineExpressions(String inlineText)Checks whether inline text contains expressions Inline expressions will be denoted inside {} without any whitespaces e.g.: {$ctx:vendor}, {get-property('vendor')}static StringgetDynamicValue(MessageContext messageContext, String expression)Get dynamic value for the expressionstatic StringreplaceDynamicValues(MessageContext messageContext, String inlineText)Replaces Dynamic Values represented by expressions in inline textstatic StringreplaceDynamicValuesForJSONPath(MessageContext messageContext, String inlineText)Replaces Dynamic Values represented by expressions inside json-eval.
-
-
-
Method Detail
-
checkForInlineExpressions
public static boolean checkForInlineExpressions(String inlineText)
Checks whether inline text contains expressions Inline expressions will be denoted inside {} without any whitespaces e.g.: {$ctx:vendor}, {get-property('vendor')}- Parameters:
inlineText- Inline text string- Returns:
- true if the string contains inline expressions, false otherwise
-
replaceDynamicValues
public static String replaceDynamicValues(MessageContext messageContext, String inlineText)
Replaces Dynamic Values represented by expressions in inline text- Parameters:
messageContext- Message ContextinlineText- Inline Text String containing the expressions- Returns:
- Inline text string with replaced dynamic values
-
replaceDynamicValuesForJSONPath
public static String replaceDynamicValuesForJSONPath(MessageContext messageContext, String inlineText)
Replaces Dynamic Values represented by expressions inside json-eval.- Parameters:
messageContext- Message Context.inlineText- JSON eval text containing the expressions.- Returns:
- Inline text string with replaced dynamic values.
-
getDynamicValue
public static String getDynamicValue(MessageContext messageContext, String expression)
Get dynamic value for the expression- Parameters:
messageContext- Message Contextexpression- Expression to be resolved- Returns:
- value of the expression
-
-