org.apache.jmeter.report.dashboard

## Class TemplateVisitor

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

- All Implemented Interfaces:
    java.nio.file.FileVisitor<java.nio.file.Path>

      public class TemplateVisitor
      extends java.nio.file.SimpleFileVisitor<java.nio.file.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 java.lang.String` | `TEMPLATED_FILE_EXT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TemplateVisitor(java.nio.file.Path source, java.nio.file.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
    --- | ---
    `java.nio.file.FileVisitResult` | `preVisitDirectory(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attrs)`
    `java.nio.file.FileVisitResult` | `visitFile(java.nio.file.Path file, java.nio.file.attribute.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 java.lang.String TEMPLATED_FILE_EXT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TemplateVisitor

          public TemplateVisitor(java.nio.file.Path source,
                                 java.nio.file.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 java.nio.file.FileVisitResult preVisitDirectory(java.nio.file.Path file,
                                                                 java.nio.file.attribute.BasicFileAttributes attrs)
                                                          throws java.io.IOException

      Specified by:
        `preVisitDirectory` in interface `java.nio.file.FileVisitor<java.nio.file.Path>`
      Overrides:
        `preVisitDirectory` in class `java.nio.file.SimpleFileVisitor<java.nio.file.Path>`
      Throws:
        `java.io.IOException`

    - #### visitFile

          public java.nio.file.FileVisitResult visitFile(java.nio.file.Path file,
                                                         java.nio.file.attribute.BasicFileAttributes attrs)
                                                  throws java.io.IOException

      Specified by:
        `visitFile` in interface `java.nio.file.FileVisitor<java.nio.file.Path>`
      Overrides:
        `visitFile` in class `java.nio.file.SimpleFileVisitor<java.nio.file.Path>`
      Throws:
        `java.io.IOException`

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