public class Template extends Object
Constructor and Description |
---|
Template(String name) |
Template(URL url) |
Modifier and Type | Method and Description |
---|---|
void |
apply(Model model,
File outputFile) |
void |
apply(Model model,
File outputFile,
Map<String,Object> vars) |
void |
apply(Model model,
String outputFileName) |
String |
getName() |
static org.mvel2.templates.CompiledTemplate |
loadCompiled(InputStream source)
Load a template given its
source . |
static org.mvel2.templates.CompiledTemplate |
loadCompiled(URL templateURL)
Load a template given its
templateURL . |
String |
render(Model model) |
String |
render(Model model,
Map<String,Object> vars) |
void |
setOptions(Map<String,String> options) |
public static org.mvel2.templates.CompiledTemplate loadCompiled(URL templateURL)
templateURL
.templateURL
- the template urlpublic static org.mvel2.templates.CompiledTemplate loadCompiled(InputStream source)
source
.source
- the template sourcepublic String getName()
public void apply(Model model, File outputFile, Map<String,Object> vars) throws Exception
Exception
Copyright © 2017. All rights reserved.