Class TemplateUtils
java.lang.Object
net.andresbustamante.yafoot.commons.utils.TemplateUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetContent
(String contentTemplate, Object contentModel) Gets some content text from a Freemarker template using a content model.
-
Constructor Details
-
TemplateUtils
public TemplateUtils(freemarker.template.Configuration freemarkerConfiguration)
-
-
Method Details
-
getContent
public String getContent(String contentTemplate, Object contentModel) throws IOException, freemarker.template.TemplateException Gets some content text from a Freemarker template using a content model.- Parameters:
contentTemplate
- Template to use for processing textcontentModel
- Model containing the variables to replace in text- Returns:
- Resulting content
- Throws:
IOException
- When the template cannot be loaded from the FSfreemarker.template.TemplateException
- When the template has errors
-