package com.akjava.lib.common.utils;

import java.util.Map;

public class TemplateUtils {
	/**
	 * very simple way just replace ${key} to value;
	 * @param template
	 * @param map
	 * @return
	 */
	public static String createText(String template,Map<String,String> map){
		String result=template;
		for(String key:map.keySet()){
			result=result.replace("${"+key+"}", map.get(key));
		}
		return result;
	}
}

@@ -33,16 +33,43 @@
 ils;%0D%0A%0D%0A
+import java.util.HashMap;%0D%0A
 import j
@@ -445,11 +445,204 @@
 t;%0D%0A%09%7D%0D%0A
+%09%0D%0A%09public static String createText(String template,String value)%7B%0D%0A%09%09Map%3CString,String%3E map=new HashMap%3CString, String%3E();%0D%0A%09%09map.put(%22value%22, value);%0D%0A%09%09return createText(template,map);%0D%0A%09%7D%0D%0A
 %7D%0D%0A

add method