Class FreemarkerUtils
java.lang.Object
pl.edu.icm.unity.engine.api.utils.FreemarkerUtils
Helper with shared routings for bootstraping template engine.
- Author:
- K. Benedyczak
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic freemarker.cache.TemplateLoader
getTemplateLoader
(String webContentsDirectory, String templatesRoot, Class<?> fallbackResourceLoaderClass) static String
processStringTemplate
(Map<String, Object> datamodel, String templateStr) static void
processTemplate
(freemarker.template.Configuration cfg, String view, Map<String, String> datamodel, Writer out) static boolean
validateStringTemplate
(String templateStr)
-
Field Details
-
TEMPLATES_ROOT
- See Also:
-
-
Constructor Details
-
FreemarkerUtils
public FreemarkerUtils()
-
-
Method Details
-
getTemplateLoader
-
processTemplate
public static void processTemplate(freemarker.template.Configuration cfg, String view, Map<String, String> datamodel, Writer out) throws IOException- Throws:
IOException
-
processStringTemplate
-
validateStringTemplate
-