@@ -0,0 +1,1361 @@
+package com.apigee.utils;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.regex.Pattern;%0Aimport java.util.regex.Matcher;%0A%0A/*%0A * TemplateString%0A *%0A * This class is used to convert a string in which curly-braces denote%0A * variables to be replaced, into a form that uses $%7Bxxx%7D, which is%0A * required by the StrSubstitutor class which is part of Apache%0A * commons.lang.%0A *%0A * It is used by Edge callout classes to read and %22resolve%22 property%0A * values that may contain multiple variable references , or variable%0A * references surrounded by other text, or both.%0A *%0A */%0Apublic class TemplateString %7B%0A    private final Pattern tmpltPattern =%0A        Pattern.compile(%22%5C%5C%7B(%5B%5E%5C%5C%7D%5D+)%5C%5C%7D%22, Pattern.CASE_INSENSITIVE);%0A    public ArrayList%3CString%3E variableNames;%0A    public String template;%0A    private void injectDollar(int position) %7B%0A        template =%0A            template.substring(0, position) +%0A            %22$%22 + template.substring(position, template.length());%0A    %7D%0A    public TemplateString(String s) %7B%0A        this.variableNames = new ArrayList%3CString%3E();%0A        examineString(s);%0A    %7D%0A%0A    private void examineString(String input) %7B%0A        this.template = input;%0A        int x = 0;%0A        Matcher m = tmpltPattern.matcher(input);%0A        while (m.find()) %7B%0A            variableNames.add(m.group(1));%0A            injectDollar(m.start() + x++);%0A        %7D%0A    %7D%0A%7D%0A

use TemplateString to resolve properties