org.apache.jmeter.gui.action.template

## Class TemplateManager

- java.lang.Object
- - org.apache.jmeter.gui.action.template.TemplateManager

-     public class TemplateManager
      extends Object

  Manages Test Plan templates
  Since:
    2.10

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TemplateManager.DefaultEntityResolver`
    `static class` | `TemplateManager.LoggingErrorHandler`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTemplate(Template template)`
    `static TemplateManager` | `getInstance()`
    `Template` | `getTemplateByName(String selectedTemplate)`
    `String[]` | `getTemplateNames()`
    `Map<String,Template>` | `parseTemplateFile(File file)`
    `TemplateManager` | `reset()` Resets the template Map by re-reading the template files.

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

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

- - ### Method Detail

    - #### getInstance

          public static TemplateManager getInstance()

    - #### addTemplate

          public void addTemplate(Template template)

    - #### reset

          public TemplateManager reset()

      Resets the template Map by re-reading the template files.
      Returns:
        this

    - #### getTemplateNames

          public String[] getTemplateNames()

      Returns:
        the templates names sorted in alphabetical order

    - #### parseTemplateFile

          public Map<String,Template> parseTemplateFile(File file)
                                                 throws IOException,
                                                        SAXException,
                                                        ParserConfigurationException

      Throws:
        `IOException`
        `SAXException`
        `ParserConfigurationException`

    - #### getTemplateByName

          public Template getTemplateByName(String selectedTemplate)

      Parameters:
        `selectedTemplate` - Template name
      Returns:
        `Template`

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