public class Templating extends Object
| Constructor and Description |
|---|
Templating() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getSubTemplate(String template,
String name)
Returns a sub template.
|
static String |
getTemplate(File f)
Returns a template from a file.
|
static String |
getTemplate(String filename)
Returns a template from a file.
|
static String |
replace(String template,
Map<String,Object> markers)
Replaces multiple simple tag markers.
|
static String |
replace(String template,
String marker,
Object value)
Replaces a simple marker by its value.
|
public static String replace(String template, String marker, Object value)
template - - text templatemarker - - marker name, e.g. MARKERvalue - - value to be replacedpublic static String replace(String template, Map<String,Object> markers)
template - - text templatemarkers - - markers mappublic static String getSubTemplate(String template, String name)
template - - parent templatename - - name of sub template, e.g. MARKERpublic static String getTemplate(String filename) throws IOException
filename - - filenameIOException - when an error occurredpublic static String getTemplate(File f) throws IOException
f - - file to loadIOException - when an error occurredCopyright © 2012. All Rights Reserved.