public final class TemplateUtility extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addProcessor(String prefix,
TemplateProcessor processor)
Adds a processor to this variable utility.
|
static Map<String,TemplateProcessor> |
getDefaultProcessors()
Return pre configured processors.
|
static String |
replaceVariables(TemplateReplacementContext context,
String src)
Replaces variable expressions in the given string src with help of default processors.
|
static String |
replaceVariables(TemplateReplacementContext context,
String src,
Map<String,TemplateProcessor> processors)
Replaces variable expressions in the given string src with the help of submitted processors.
|
public static void addProcessor(String prefix, TemplateProcessor processor)
prefix - prefix for processor mapping.processor - processor.public static Map<String,TemplateProcessor> getDefaultProcessors()
public static String replaceVariables(TemplateReplacementContext context, String src)
context - additional parameters for processorssrc - textpublic static String replaceVariables(TemplateReplacementContext context, String src, Map<String,TemplateProcessor> processors)
context - additional parameters for processorssrc - textprocessors - collection of processors which should be usedCopyright © 2010-2014 anotheria.net. All Rights Reserved.