Interface OutputTool

All Known Implementing Classes:
FileOutputTool, MockOutputTool

public interface OutputTool
Receives rendered documentation output and supporting resource copies.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copyResource(String srcPath, String dstPath)
    Copy a resource file (doc-files/, snippet-files/ content) from srcPath to dstPath.
    void
    Ensures that the supplied output location exists.
    void
    writeToOutput(String fileName, String text, String charset)
    Writes rendered text to the supplied output file.
  • Method Details

    • makeOutputArea

      void makeOutputArea(String filename)
      Ensures that the supplied output location exists.
      Parameters:
      filename - the output directory or root path to prepare
    • writeToOutput

      void writeToOutput(String fileName, String text, String charset) throws Exception
      Writes rendered text to the supplied output file.
      Parameters:
      fileName - the file to write
      text - the rendered content
      charset - the character set to use when writing
      Throws:
      Exception - if the output cannot be written
    • copyResource

      void copyResource(String srcPath, String dstPath) throws Exception
      Copy a resource file (doc-files/, snippet-files/ content) from srcPath to dstPath. Routed through the tool rather than calling Files.copy directly so that alternative tools (notably MockOutputTool) can intercept the side-effect.
      Throws:
      Exception
      Since:
      6.0.0