Package biz.aQute.bnd.reporter.generator
Class ReportGeneratorBuilder
- java.lang.Object
-
- biz.aQute.bnd.reporter.generator.ReportGeneratorBuilder
-
public class ReportGeneratorBuilder extends java.lang.Object
Build theReportGeneratorService
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.String>
_pluginNames
private java.util.List<java.lang.String>
_plugins
private Processor
_processor
private boolean
_useCustomConfig
-
Constructor Summary
Constructors Modifier Constructor Description private
ReportGeneratorBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReportGeneratorBuilder
addPlugin(java.lang.String classNameOrPluginName)
Add a plugin to be used as default plugins for custom configuration or in addition to plugins defined by the processor.ReportGeneratorService
build()
Build the service.private Processor
configureProcessor(Processor processor)
static ReportGeneratorBuilder
create()
Create a new builder.private java.lang.String
findPluginName(java.lang.String className)
private Parameters
generateDefaultPlugins()
private Parameters
readPluginsConfig(Processor processor)
private void
registerDefaultPlugins()
ReportGeneratorBuilder
registerPlugin(java.lang.String className)
Register a plugin to be used by theReportGeneratorConstants.REPORT_CONFIG_INSTRUCTION
and to be able to use plugin short names.private ReportGeneratorBuilder
registerPluginIfAbsent(java.lang.String className)
private java.lang.String
removeDuplicateMarker(java.lang.String key)
ReportGeneratorBuilder
setProcessor(Processor processor)
Set the processor from which plugins are loaded as well as properties and to which errors are reported.ReportGeneratorBuilder
useCustomConfig()
If set, theReportGeneratorConstants.REPORT_CONFIG_INSTRUCTION
instruction will be processed to customize the report generation.ReportGeneratorBuilder
withAggregatorProjectDefaultPlugins()
Add the default plugins used to extract aggregator project or workspace data.ReportGeneratorBuilder
withBundleDefaultPlugins()
Add the default plugins used to extract bundle data.ReportGeneratorBuilder
withProjectDefaultPlugins()
Add the default plugins used to extract project data.
-
-
-
Field Detail
-
_processor
private Processor _processor
-
_pluginNames
private final java.util.Map<java.lang.String,java.lang.String> _pluginNames
-
_plugins
private final java.util.List<java.lang.String> _plugins
-
_useCustomConfig
private boolean _useCustomConfig
-
-
Method Detail
-
create
public static ReportGeneratorBuilder create()
Create a new builder.- Returns:
- the builder
-
setProcessor
public ReportGeneratorBuilder setProcessor(Processor processor)
Set the processor from which plugins are loaded as well as properties and to which errors are reported.- Parameters:
processor
- the processor to use.- Returns:
- the builder
-
useCustomConfig
public ReportGeneratorBuilder useCustomConfig()
If set, theReportGeneratorConstants.REPORT_CONFIG_INSTRUCTION
instruction will be processed to customize the report generation.- Returns:
- the builder
-
registerPlugin
public ReportGeneratorBuilder registerPlugin(java.lang.String className)
Register a plugin to be used by theReportGeneratorConstants.REPORT_CONFIG_INSTRUCTION
and to be able to use plugin short names.- Parameters:
className
- the class name of the plugin.- Returns:
- the builder
-
registerPluginIfAbsent
private ReportGeneratorBuilder registerPluginIfAbsent(java.lang.String className)
-
addPlugin
public ReportGeneratorBuilder addPlugin(java.lang.String classNameOrPluginName)
Add a plugin to be used as default plugins for custom configuration or in addition to plugins defined by the processor.- Parameters:
classNameOrPluginName
- a class name or the short name of a plugin.- Returns:
- the builder
-
withBundleDefaultPlugins
public ReportGeneratorBuilder withBundleDefaultPlugins()
Add the default plugins used to extract bundle data.- Returns:
- the builder
-
withProjectDefaultPlugins
public ReportGeneratorBuilder withProjectDefaultPlugins()
Add the default plugins used to extract project data.- Returns:
- the builder
-
withAggregatorProjectDefaultPlugins
public ReportGeneratorBuilder withAggregatorProjectDefaultPlugins()
Add the default plugins used to extract aggregator project or workspace data.- Returns:
- the builder
-
build
public ReportGeneratorService build()
Build the service.- Returns:
- the service
-
findPluginName
private java.lang.String findPluginName(java.lang.String className)
-
registerDefaultPlugins
private void registerDefaultPlugins()
-
generateDefaultPlugins
private Parameters generateDefaultPlugins()
-
readPluginsConfig
private Parameters readPluginsConfig(Processor processor)
-
removeDuplicateMarker
private java.lang.String removeDuplicateMarker(java.lang.String key)
-
-