Package 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
Description
`static class`
`TemplateManager.DefaultEntityResolver`
`static final class`
`TemplateManager.LoggingErrorHandler`

## Method Summary

Modifier and Type
Method
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 Details

### 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`