Class FreemarkerTemplate


  • public class FreemarkerTemplate
    extends Object
    • Constructor Detail

      • FreemarkerTemplate

        public FreemarkerTemplate​(freemarker.template.Configuration freemarkerConfiguration)
      • FreemarkerTemplate

        public FreemarkerTemplate​(Class<?> clazz,
                                  String encoding)
      • FreemarkerTemplate

        public FreemarkerTemplate​(Class<?> clazz,
                                  String basePackagePath,
                                  String encoding)
    • Method Detail

      • createTemplate

        public freemarker.template.Template createTemplate​(String templatePath)
                                                    throws freemarker.template.TemplateNotFoundException,
                                                           freemarker.template.MalformedTemplateNameException,
                                                           freemarker.core.ParseException,
                                                           IOException
        Throws:
        freemarker.template.TemplateNotFoundException
        freemarker.template.MalformedTemplateNameException
        freemarker.core.ParseException
        IOException
      • getSource

        public String getSource​(freemarker.template.Template template,
                                Map<String,​Object> templateMap)
                         throws freemarker.template.TemplateException,
                                IOException
        Throws:
        freemarker.template.TemplateException
        IOException
      • writeTemplate

        public void writeTemplate​(freemarker.template.Template template,
                                  Map<String,​Object> templateMap,
                                  File outputFile)
                           throws freemarker.template.TemplateException,
                                  IOException
        Throws:
        freemarker.template.TemplateException
        IOException