Package org.apache.jmeter.report.dashboard

# Class TemplateVisitor

java.lang.Object
java.nio.file.SimpleFileVisitor<Path>
org.apache.jmeter.report.dashboard.TemplateVisitor

All Implemented Interfaces:
  `FileVisitor<Path>`

public class TemplateVisitor extends SimpleFileVisitor<Path>
The class TemplateVisitor visits files in a template directory to copy regular files and process templated ones.

Since:
  3.0

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`TEMPLATED_FILE_EXT`

## Constructor Summary

Constructors
Constructor
Description
`TemplateVisitor(Path source, Path target, freemarker.template.Configuration configuration, DataContext data)`
Instantiates a new template visitor.

## Method Summary

Modifier and Type
Method
Description
`FileVisitResult`
`preVisitDirectory(Path file, BasicFileAttributes attrs)`
`FileVisitResult`
`visitFile(Path file, BasicFileAttributes attrs)`

### Methods inherited from class java.nio.file.SimpleFileVisitor

`postVisitDirectory, visitFileFailed`

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

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

## Field Details

### TEMPLATED_FILE_EXT

public static final String TEMPLATED_FILE_EXT

See Also:
  - Constant Field Values

## Constructor Details

### TemplateVisitor

public TemplateVisitor(Path source, Path target, freemarker.template.Configuration configuration, DataContext data)
Instantiates a new template visitor.

Parameters:
  `source` - the source directory
  `target` - the target directory
  `configuration` - the freemarker configuration
  `data` - the data to inject

## Method Details

### preVisitDirectory

public FileVisitResult preVisitDirectory(Path file, BasicFileAttributes attrs) throws IOException

Specified by:
  `preVisitDirectory` in interface `FileVisitor<Path>`
Overrides:
  `preVisitDirectory` in class `SimpleFileVisitor<Path>`
Throws:
  `IOException`

### visitFile

public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException

Specified by:
  `visitFile` in interface `FileVisitor<Path>`
Overrides:
  `visitFile` in class `SimpleFileVisitor<Path>`
Throws:
  `IOException`