@Service public class GumgaFreemarkerTemplateEngineService extends GumgaAbstractTemplateEngineAdapter
| Constructor and Description |
|---|
GumgaFreemarkerTemplateEngineService() |
GumgaFreemarkerTemplateEngineService(String templateFolder,
String defaultEncoding)
Construtor
|
| Modifier and Type | Method and Description |
|---|---|
void |
init()
Inicializa as configurações iniciais do Freemaker
|
String |
parse(Map<String,Object> values,
String template)
Substitui variáveis de template pelos valores
|
void |
parse(Map<String,Object> values,
String template,
Writer out)
Substitui variáveis de template pelos valores granvando em um arquivo
|
void |
setDefaultEncoding(String encoding)
Configura codificação padrão
|
void |
setTemplateFolder(String folder)
Configura diretório dos templates
|
checkFolderpublic GumgaFreemarkerTemplateEngineService()
public void setTemplateFolder(String folder)
folder - The folder where the templates are locatedpublic void setDefaultEncoding(String encoding)
encoding - The encoding of the templates like UTF-8 and etc.public void parse(Map<String,Object> values, String template, Writer out) throws TemplateEngineException
values - The values to be merged with the templatetemplate - The template to be parsedout - The object responsible to save the output file. It may be an
OutputStream for example.TemplateEngineExceptionpublic String parse(Map<String,Object> values, String template) throws TemplateEngineException
values - The values to be merged with the templatetemplate - The template to be parsedTemplateEngineExceptionpublic void init()
throws TemplateEngineException
TemplateEngineExceptionCopyright © 2018 Gumga. All rights reserved.