private static Map<String, List<Object>> getListMap(Message message, List<ExpressionMapping> expressionMappings, boolean expand, String undefinedVariable, Map<String, Object> expressionVariables) { Map<String, List<Object>> map = new HashMap<String, List<Object>>(); if (expressionMappings != null) { for (ExpressionMapping em : expressionMappings) { String variable = em.getTo(); if (variable == null && undefinedVariable != null) { variable = undefinedVariable; } if (variable != null) { List<Object> list = map.get(variable); if (list == null) { list = new ArrayList<Object>(); map.put(variable, list); } Object value = run(message, em.getFromExpression(), expressionVariables); if (expand) { expand(value, list); } else if (value != null) { list.add(value); } } } } return map; }
private static Map<String, List<Object>> getListMap(Message message, List<ExpressionMapping> expressionMappings, boolean expand, String undefinedVariable, Map<String, Object> expressionVariables) { Map<String, List<Object>> map = new HashMap<String, List<Object>>(); if (expressionMappings != null) { for (ExpressionMapping em : expressionMappings) { String variable = em.getTo(); if (variable == null && undefinedVariable != null) { variable = undefinedVariable; } if (variable != null) { List<Object> list = map.get(variable); if (list == null) { list = new ArrayList<Object>(); map.put(variable, list); } Object value = run(message, em.getFromExpression(), expressionVariables); if (expand) { expand(value, list); } else if (value != null) { list.add(value); } } } } return map; }
to_em = from_em; Object from_value = run(message, from_em.getFromExpression(), expressionVariables); if (from_value != null) { from_list.add(from_value); String output_to = to_em.getTo() + " = " + output_var; Expression output_to_expr = ExpressionFactory.INSTANCE.create(output_to, null, to_em.getPropertyResolver()); run(message, output_to_expr, expressionVariables);
to_em = from_em; Object from_value = run(message, from_em.getFromExpression(), expressionVariables); if (from_value != null) { from_list.add(from_value); String output_to = to_em.getTo() + " = " + output_var; Expression output_to_expr = ExpressionFactory.INSTANCE.create(output_to, null, to_em.getPropertyResolver()); run(message, output_to_expr, expressionVariables);