Package org.java.plugin.tools.docgen
Class DocGenerator
java.lang.Object
org.java.plugin.tools.docgen.DocGenerator
Tool class to generate documentation for plug-ins using JXP templates.
- Version:
- $Id$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Utility class to be used from JXP templates. -
Constructor Summary
ConstructorsConstructorDescriptionDocGenerator
(PluginRegistry aRegistry, PathResolver aPathResolver) Constructs generator configured to use pre-defined set of templates.DocGenerator
(PluginRegistry aRegistry, PathResolver aPathResolver, File templatesFolder, String templatesEncoding) Constructs generator configured to use custom templates located somewhere in the local file system.DocGenerator
(PluginRegistry aRegistry, PathResolver aPathResolver, String templatesPath, String templatesEncoding) Constructs generator configured to use custom templates available in the classpath. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Generates documentation for all registered plug-ins.void
setDocumentationOverview
(String aDocumentationOverview) void
setOutputEncoding
(String encoding) void
setStylesheet
(String aStylesheet)
-
Constructor Details
-
DocGenerator
Constructs generator configured to use pre-defined set of templates.- Parameters:
aRegistry
- plug-ins registryaPathResolver
- 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 registryaPathResolver
- path resolvertemplatesPath
- path to templates (should be available in classpath)templatesEncoding
- templates characters encoding, ifnull
, 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 registryaPathResolver
- path resolvertemplatesFolder
- folder with templatestemplatesEncoding
- templates characters encoding, ifnull
, system default will be used- Throws:
Exception
- if an error has occurred
-
-
Method Details
-
getDocumentationOverview
- Returns:
- documentation overview HTML content
-
setDocumentationOverview
- Parameters:
aDocumentationOverview
- documentation overview HTML content
-
getStylesheet
- Returns:
- CSS style sheet content
-
setStylesheet
- Parameters:
aStylesheet
- CSS style sheet content
-
getOutputEncoding
- Returns:
- output files encoding name
-
setOutputEncoding
- Parameters:
encoding
- output files encoding name (default is UTF-8)
-
generate
Generates documentation for all registered plug-ins.- Parameters:
destDir
- target folder- Throws:
Exception
- if an error has occurred
-