Class FreemarkerUtils

java.lang.Object
pl.edu.icm.unity.engine.api.utils.FreemarkerUtils

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

  • Constructor Details

    • FreemarkerUtils

      public FreemarkerUtils()
  • Method Details

    • getTemplateLoader

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

      public static void processTemplate(freemarker.template.Configuration cfg, String view, Map<String,String> datamodel, Writer out) throws IOException
      Throws:
      IOException
    • processStringTemplate

      public static String processStringTemplate(Map<String,Object> datamodel, String templateStr)
    • validateStringTemplate

      public static boolean validateStringTemplate(String templateStr)