@Test public void testSubjectAsEmbeddedExpressionWithSurroundChars() { final Map<String, String> attributes = new HashMap<>(); attributes.put("b", "x"); attributes.put("abcxcba", "hello"); final String evaluated = Query.evaluateExpressions("${ 'abc${b}cba':substring(0, 1) }", attributes, null); assertEquals("h", evaluated); }
static String evaluateExpressions(final String rawValue, Map<String, String> expressionMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException { return Query.prepare(rawValue).evaluateExpressions(expressionMap, decorator, stateVariables); }
Query { static String evaluateExpressions(final String rawValue, Map<String, String> expressionMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException { return Query.prepare(rawValue).evaluateExpressions(expressionMap, decorator, stateVariables); } }
Query { static String evaluateExpressions(final String rawValue, Map<String, String> expressionMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException { return Query.prepare(rawValue).evaluateExpressions(expressionMap, decorator, stateVariables); } private  Query(final String query, final Tree tree, final Evaluator<?> evaluator); }
Query { static String evaluateExpressions(final String rawValue, Map<String, String> expressionMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException { return Query.prepare(rawValue).evaluateExpressions(expressionMap, decorator, stateVariables); } private  Query(final String query, final Tree tree, final Evaluator<?> evaluator); static boolean isValidExpression(final String value); static ResultType getResultType(final String value); static List<ResultType> extractResultTypes(final String value); static List<String> extractExpressions(final String value); static List<Range> extractExpressionRanges(final String value); static void validateExpression(final String value, final boolean allowSurroundingCharacters); static String unescape(final String value); static Query fromTree(final Tree tree, final String text); static Tree compileTree(final String query); static PreparedQuery prepare(final String query); static Query compile(final String query); ResultType getResultType(); @Override String toString(); }
Query { static String evaluateExpressions(final String rawValue, Map<String, String> expressionMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException { return Query.prepare(rawValue).evaluateExpressions(expressionMap, decorator, stateVariables); } private  Query(final String query, final Tree tree, final Evaluator<?> evaluator); static boolean isValidExpression(final String value); static ResultType getResultType(final String value); static List<ResultType> extractResultTypes(final String value); static List<String> extractExpressions(final String value); static List<Range> extractExpressionRanges(final String value); static void validateExpression(final String value, final boolean allowSurroundingCharacters); static String unescape(final String value); static Query fromTree(final Tree tree, final String text); static Tree compileTree(final String query); static PreparedQuery prepare(final String query); static Query compile(final String query); ResultType getResultType(); @Override String toString();  }