JPF 1.5.1

org.java.plugin.tools.docgen
Class DocGenerator

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

public final class DocGenerator
extends java.lang.Object

Tool class to generate documentation for plug-ins using JXP templates.

Version:
$Id$

Nested Class Summary
static class DocGenerator.Tool
          Utility class to be used from JXP templates.
 
Constructor Summary
DocGenerator(PluginRegistry aRegistry, PathResolver aPathResolver)
          Constructs generator configured to use pre-defined set of templates.
DocGenerator(PluginRegistry aRegistry, PathResolver aPathResolver, java.io.File templatesFolder, java.lang.String templatesEncoding)
          Constructs generator configured to use custom templates located somewhere in the local file system.
DocGenerator(PluginRegistry aRegistry, PathResolver aPathResolver, java.lang.String templatesPath, java.lang.String templatesEncoding)
          Constructs generator configured to use custom templates available in the classpath.
 
Method Summary
 void generate(java.io.File destDir)
          Generates documentation for all registered plug-ins.
 java.lang.String getDocumentationOverview()
           
 java.lang.String getOutputEncoding()
           
 java.lang.String getStylesheet()
           
 void setDocumentationOverview(java.lang.String aDocumentationOverview)
           
 void setOutputEncoding(java.lang.String encoding)
           
 void setStylesheet(java.lang.String aStylesheet)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocGenerator

public DocGenerator(PluginRegistry aRegistry,
                    PathResolver aPathResolver)
             throws java.lang.Exception
Constructs generator configured to use pre-defined set of templates.

Parameters:
aRegistry - plug-ins registry
aPathResolver - path resolver
Throws:
java.lang.Exception - if an error has occurred

DocGenerator

public DocGenerator(PluginRegistry aRegistry,
                    PathResolver aPathResolver,
                    java.lang.String templatesPath,
                    java.lang.String templatesEncoding)
             throws java.lang.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:
java.lang.Exception - if an error has occurred

DocGenerator

public DocGenerator(PluginRegistry aRegistry,
                    PathResolver aPathResolver,
                    java.io.File templatesFolder,
                    java.lang.String templatesEncoding)
             throws java.lang.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:
java.lang.Exception - if an error has occurred
Method Detail

getDocumentationOverview

public java.lang.String getDocumentationOverview()
Returns:
documentation overview HTML content

setDocumentationOverview

public void setDocumentationOverview(java.lang.String aDocumentationOverview)
Parameters:
aDocumentationOverview - documentation overview HTML content

getStylesheet

public java.lang.String getStylesheet()
Returns:
CSS style sheet content

setStylesheet

public void setStylesheet(java.lang.String aStylesheet)
Parameters:
aStylesheet - CSS style sheet content

getOutputEncoding

public java.lang.String getOutputEncoding()
Returns:
output files encoding name

setOutputEncoding

public void setOutputEncoding(java.lang.String encoding)
Parameters:
encoding - output files encoding name (default is UTF-8)

generate

public void generate(java.io.File destDir)
              throws java.lang.Exception
Generates documentation for all registered plug-ins.

Parameters:
destDir - target folder
Throws:
java.lang.Exception - if an error has occurred

JPF 1.5.1

Copyright © 2004-2007 Dmitry Olshansky. All Rights Reserved.