public class Templating extends Object
Constructor | Description |
---|---|
Templating() |
Modifier and Type | Method | 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,
String marker,
Object value) |
Replaces a simple marker by its value.
|
static String |
replace(String template,
Map<String,Object> markers) |
Replaces multiple simple tag markers.
|
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 object to load fromIOException
- when an error occurredCopyright © 2018. All rights reserved.