Class FreemarkerUtils

java.lang.Object
org.keycloak.utils.FreemarkerUtils

public class FreemarkerUtils extends Object
Author:
Marek Posolda
  • Constructor Details

    • FreemarkerUtils

      public FreemarkerUtils()
  • Method Details

    • loadTemplateFromClasspath

      public static String loadTemplateFromClasspath(Map<String,Object> contextMap, String templateFile, Class<?> clazz) throws freemarker.template.TemplateException, IOException
      Load the template from classpath
      Parameters:
      contextMap - map with the attributes passed to freemarker
      templateFile - Name of the file, which is supposed to be available on classpath
      clazz - Class, which should be in same package as the template
      Returns:
      template from classpath
      Throws:
      freemarker.template.TemplateException
      IOException