Class FreemarkerUtils


  • public class FreemarkerUtils
    extends java.lang.Object
    Helper with shared routings for bootstraping template engine.
    Author:
    K. Benedyczak
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String TEMPLATES_ROOT  
    • Constructor Summary

      Constructors 
      Constructor Description
      FreemarkerUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static freemarker.cache.TemplateLoader getTemplateLoader​(java.lang.String webContentsDirectory, java.lang.String templatesRoot, java.lang.Class<?> fallbackResourceLoaderClass)  
      static void processTemplate​(freemarker.template.Configuration cfg, java.lang.String view, java.util.Map<java.lang.String,​java.lang.String> datamodel, java.io.Writer out)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FreemarkerUtils

        public FreemarkerUtils()
    • Method Detail

      • getTemplateLoader

        public static freemarker.cache.TemplateLoader getTemplateLoader​(java.lang.String webContentsDirectory,
                                                                        java.lang.String templatesRoot,
                                                                        java.lang.Class<?> fallbackResourceLoaderClass)
      • processTemplate

        public static void processTemplate​(freemarker.template.Configuration cfg,
                                           java.lang.String view,
                                           java.util.Map<java.lang.String,​java.lang.String> datamodel,
                                           java.io.Writer out)
                                    throws java.io.IOException
        Throws:
        java.io.IOException