Class TemplateUtils

java.lang.Object
net.andresbustamante.yafoot.commons.utils.TemplateUtils

@Component public class TemplateUtils extends Object
  • 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 text
      contentModel - Model containing the variables to replace in text
      Returns:
      Resulting content
      Throws:
      IOException - When the template cannot be loaded from the FS
      freemarker.template.TemplateException - When the template has errors