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 and Description
    --- | ---
    `static String` | `TEMPLATED_FILE_EXT`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### TEMPLATED_FILE_EXT

          public static final String TEMPLATED_FILE_EXT

      See Also:
        Constant Field Values

  - ### Constructor Detail

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

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

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