Class InlineExpressionUtil


  • public final class InlineExpressionUtil
    extends Object
    Utils used to resolve expressions provided in inline texts in mediators
    • 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 Context
        inlineText - 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 Context
        expression - Expression to be resolved
        Returns:
        value of the expression