public class FreemarkerTestHelper extends Object
Constructor and Description |
---|
FreemarkerTestHelper() |
Modifier and Type | Method and Description |
---|---|
static freemarker.template.Configuration |
createTestingConfiguration(Class<?> clazz,
String template)
Create FreeMarker testing configuration
|
static String |
runFreemarkerMacro(Class<?> clazz,
Map datamodel,
String template,
String macro,
String macroParams)
Process a template macro using FreeMarker and return the results
If template has some 'not macro' code it will be run anyway...
|
public static freemarker.template.Configuration createTestingConfiguration(Class<?> clazz, String template) throws IOException
clazz
- class to get classloader from for loading templatestemplate
- example template to be loaded with this configuration (to detect if it's run locally)IOException
public static String runFreemarkerMacro(Class<?> clazz, Map datamodel, String template, String macro, String macroParams) throws Exception
clazz
- class to get classloader from for loading templatesdatamodel
- FreeMarker contexttemplate
- template file namemacro
- macro name in templatemacroParams
- call parameters of macroException
- if processing went wrongCopyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.