Class DocGenerator

java.lang.Object
org.java.plugin.tools.docgen.DocGenerator

public final class DocGenerator extends Object
Tool class to generate documentation for plug-ins using JXP templates.
Version:
$Id$
  • Constructor Details

    • DocGenerator

      public DocGenerator(PluginRegistry aRegistry, PathResolver aPathResolver) throws Exception
      Constructs generator configured to use pre-defined set of templates.
      Parameters:
      aRegistry - plug-ins registry
      aPathResolver - path resolver
      Throws:
      Exception - if an error has occurred
    • DocGenerator

      public DocGenerator(PluginRegistry aRegistry, PathResolver aPathResolver, String templatesPath, String templatesEncoding) throws Exception
      Constructs generator configured to use custom templates available in the classpath.
      Parameters:
      aRegistry - plug-ins registry
      aPathResolver - path resolver
      templatesPath - path to templates (should be available in classpath)
      templatesEncoding - templates characters encoding, if null, system default will be used
      Throws:
      Exception - if an error has occurred
    • DocGenerator

      public DocGenerator(PluginRegistry aRegistry, PathResolver aPathResolver, File templatesFolder, String templatesEncoding) throws Exception
      Constructs generator configured to use custom templates located somewhere in the local file system.
      Parameters:
      aRegistry - plug-ins registry
      aPathResolver - path resolver
      templatesFolder - folder with templates
      templatesEncoding - templates characters encoding, if null, system default will be used
      Throws:
      Exception - if an error has occurred
  • Method Details

    • getDocumentationOverview

      public String getDocumentationOverview()
      Returns:
      documentation overview HTML content
    • setDocumentationOverview

      public void setDocumentationOverview(String aDocumentationOverview)
      Parameters:
      aDocumentationOverview - documentation overview HTML content
    • getStylesheet

      public String getStylesheet()
      Returns:
      CSS style sheet content
    • setStylesheet

      public void setStylesheet(String aStylesheet)
      Parameters:
      aStylesheet - CSS style sheet content
    • getOutputEncoding

      public String getOutputEncoding()
      Returns:
      output files encoding name
    • setOutputEncoding

      public void setOutputEncoding(String encoding)
      Parameters:
      encoding - output files encoding name (default is UTF-8)
    • generate

      public void generate(File destDir) throws Exception
      Generates documentation for all registered plug-ins.
      Parameters:
      destDir - target folder
      Throws:
      Exception - if an error has occurred