|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mule.util.TemplateParser
TemplateParser is a simple string parser that will substitute
tokens in a string with values supplied in a Map.
| Nested Class Summary | |
static interface |
TemplateParser.TemplateCallback
|
| Field Summary | |
static String |
ANT_TEMPLATE_STYLE
|
protected static Log |
logger
logger used by this class |
static String |
SQUARE_TEMPLATE_STYLE
|
| Method Summary | |
static TemplateParser |
createAntStyleParser()
|
static TemplateParser |
createSquareBracesStyleParser()
|
String |
getStyle()
|
boolean |
isContainsTemplate(String value)
|
List |
parse(Map props,
List templates)
Matches one or more templates against a Map of key value pairs. |
Map |
parse(Map props,
Map templates)
Matches one or more templates against a Map of key value pairs. |
String |
parse(Map props,
String template)
Matches one or more templates against a Map of key value pairs. |
protected String |
parse(Map props,
String template,
TemplateParser.TemplateCallback callback)
|
String |
parse(TemplateParser.TemplateCallback callback,
String template)
Matches one or more templates against a Map of key value pairs. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String ANT_TEMPLATE_STYLE
public static final String SQUARE_TEMPLATE_STYLE
protected static Log logger
| Method Detail |
public static TemplateParser createAntStyleParser()
public static TemplateParser createSquareBracesStyleParser()
public String parse(Map props,
String template)
props - the key/value pairs to match againsttemplate - the string containing the template place holders i.e. My name
is ${name}
public String parse(TemplateParser.TemplateCallback callback,
String template)
callback - a callback used to resolve the property nametemplate - the string containing the template place holders i.e. My name
is ${name}
protected String parse(Map props,
String template,
TemplateParser.TemplateCallback callback)
public List parse(Map props,
List templates)
props - the key/value pairs to match againsttemplates - A List of templates
public Map parse(Map props,
Map templates)
props - the key/value pairs to match againsttemplates - A Map of templates. The values for each map entry will be
parsed
public String getStyle()
public boolean isContainsTemplate(String value)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||