Interface PreparedTemplate

All Superinterfaces:
AutoCloseable

public interface PreparedTemplate extends AutoCloseable
Represents an already preprocessed template file.

These files may be serialized or cached for later use.

  • Method Details

    • getTemplateFile

      File getTemplateFile()
      Original template file that was preprocessed.
      Returns:
      original template file
    • getTemplateFormat

      default TemplateDocumentFormats getTemplateFormat()
      Format of template file. Tries to guess from file name by default.
    • creationDateTime

      LocalDateTime creationDateTime()
      Time when the template was processed.
      Returns:
      template preprocess call time
    • getVariables

      TemplateVariables getVariables()
      Set of template variables found in file.
    • close

      void close()
      Makes the template clean up any resources allocated for it. Subsequent invocations of this method have no effects. Rendering the template after this method call will throw an IllegalStateException.
      Specified by:
      close in interface AutoCloseable
    • render

      EvaluatedDocument render(Map<String,PreparedFragment> fragments, FunctionEvaluator function, TemplateData templateData)
      Renders the current prepared template file with the given template data.