Package org.apache.jmeter.util
Class TemplateUtil
java.lang.Object
org.apache.jmeter.util.TemplateUtil
Class used to process freemarkers templates
- Since:
- 5.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic freemarker.template.Configuration
Give a basic templateConfigurationstatic void
processTemplate
(File template, File outputFile, freemarker.template.Configuration templateConfig, Map<String, String> data) Process a given freemarker template and put its result in a new folder.
-
Method Details
-
getTemplateConfig
public static freemarker.template.Configuration getTemplateConfig()Give a basic templateConfiguration- Returns:
- a Configuration
-
processTemplate
public static void processTemplate(File template, File outputFile, freemarker.template.Configuration templateConfig, Map<String, String> data) throws IOException, freemarker.template.TemplateExceptionProcess a given freemarker template and put its result in a new folder.- Parameters:
template
- file that contains the freemarker template to processoutputFile
-File
created from templatetemplateConfig
- Configuration of the templatedata
- to inject in the template- Throws:
IOException
- if an I/O exception occurs during writing to the writerfreemarker.template.TemplateException
- if an exception occurs during template processing
-