org.apache.jmeter.util

## Class TemplateUtil

- java.lang.Object
- - org.apache.jmeter.util.TemplateUtil

-     public final class TemplateUtil
      extends Object

  Class used to process freemarkers templates
  Since:
    5.1

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static freemarker.template.Configuration` | `getTemplateConfig()` Give a basic templateConfiguration
    `static 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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### 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.TemplateException

      Process a given freemarker template and put its result in a new folder.
      Parameters:
        `template` - file that contains the freemarker template to process
        `outputFile` - `File` created from template
        `templateConfig` - Configuration of the template
        `data` - to inject in the template
      Throws:
        `IOException` - if an I/O exception occurs during writing to the writer
        `freemarker.template.TemplateException` - if an exception occurs during template processing

Copyright © 1998-2021 Apache Software Foundation. All Rights Reserved.