Package biz.aQute.bnd.reporter.generator
Class ReportGeneratorBuilder
- java.lang.Object
-
- biz.aQute.bnd.reporter.generator.ReportGeneratorBuilder
-
public class ReportGeneratorBuilder extends java.lang.ObjectBuild theReportGeneratorService.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.String>_pluginNamesprivate java.util.List<java.lang.String>_pluginsprivate Processor_processorprivate boolean_useCustomConfig
-
Constructor Summary
Constructors Modifier Constructor Description privateReportGeneratorBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReportGeneratorBuilderaddPlugin(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.ReportGeneratorServicebuild()Build the service.private ProcessorconfigureProcessor(Processor processor)static ReportGeneratorBuildercreate()Create a new builder.private java.lang.StringfindPluginName(java.lang.String className)private ParametersgenerateDefaultPlugins()private ParametersreadPluginsConfig(Processor processor)private voidregisterDefaultPlugins()ReportGeneratorBuilderregisterPlugin(java.lang.String className)Register a plugin to be used by theReportGeneratorConstants.REPORT_CONFIG_INSTRUCTIONand to be able to use plugin short names.private ReportGeneratorBuilderregisterPluginIfAbsent(java.lang.String className)private java.lang.StringremoveDuplicateMarker(java.lang.String key)ReportGeneratorBuildersetProcessor(Processor processor)Set the processor from which plugins are loaded as well as properties and to which errors are reported.ReportGeneratorBuilderuseCustomConfig()If set, theReportGeneratorConstants.REPORT_CONFIG_INSTRUCTIONinstruction will be processed to customize the report generation.ReportGeneratorBuilderwithAggregatorProjectDefaultPlugins()Add the default plugins used to extract aggregator project or workspace data.ReportGeneratorBuilderwithBundleDefaultPlugins()Add the default plugins used to extract bundle data.ReportGeneratorBuilderwithProjectDefaultPlugins()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_INSTRUCTIONinstruction 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_INSTRUCTIONand 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)
-
-