Class BndProjectContentsPlugin
- java.lang.Object
-
- biz.aQute.bnd.reporter.plugins.entries.bndproject.BndProjectContentsPlugin
-
- All Implemented Interfaces:
Plugin
,ReportEntryPlugin<Project>
public class BndProjectContentsPlugin extends java.lang.Object implements ReportEntryPlugin<Project>, Plugin
This plugins allows to extract all the bundles built by a bnd project. The user can set theEXCLUDES_PROPERTY
to skip some bundles and theUSE_CONFIG_PROPERTY
to the desired configuration name that will be used to generate the report of the bundles.
-
-
Field Summary
Fields Modifier and Type Field Description private ReportGeneratorBuilder
_generatorBuilder
private java.util.Map<java.lang.String,java.lang.String>
_properties
private Reporter
_reporter
static java.lang.String
EXCLUDES_PROPERTY
static java.lang.String
USE_CONFIG_PROPERTY
-
Fields inherited from interface aQute.bnd.service.reporter.ReportEntryPlugin
ENTRY_NAME_PROPERTY, SOURCE_CLASS_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description BndProjectContentsPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
extract(Project project, java.util.Locale locale)
Extracts a piece of information from the source in arguments.private java.lang.String
getConfigName()
private java.util.Set<java.lang.String>
getExcludes()
java.util.Map<java.lang.String,java.lang.String>
getProperties()
void
setProperties(java.util.Map<java.lang.String,java.lang.String> map)
Give the plugin the remaining properties.void
setReporter(Reporter processor)
Set the current reporter.
-
-
-
Field Detail
-
USE_CONFIG_PROPERTY
public static final java.lang.String USE_CONFIG_PROPERTY
- See Also:
- Constant Field Values
-
EXCLUDES_PROPERTY
public static final java.lang.String EXCLUDES_PROPERTY
- See Also:
- Constant Field Values
-
_reporter
private Reporter _reporter
-
_properties
private final java.util.Map<java.lang.String,java.lang.String> _properties
-
_generatorBuilder
private final ReportGeneratorBuilder _generatorBuilder
-
-
Method Detail
-
setReporter
public void setReporter(Reporter processor)
Description copied from interface:Plugin
Set the current reporter. This is called at init time. This plugin should report all errors and warnings to this reporter.- Specified by:
setReporter
in interfacePlugin
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String> map) throws java.lang.Exception
Description copied from interface:Plugin
Give the plugin the remaining properties. When a plugin is declared, the clause can contain extra properties. All the properties and directives are given to the plugin to use.- Specified by:
setProperties
in interfacePlugin
- Parameters:
map
- attributes and directives for this plugin's clause- Throws:
java.lang.Exception
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
- Specified by:
getProperties
in interfaceReportEntryPlugin<Project>
- Returns:
- a map of properties, never
null
-
getExcludes
private java.util.Set<java.lang.String> getExcludes()
-
getConfigName
private java.lang.String getConfigName()
-
extract
public java.lang.Object extract(Project project, java.util.Locale locale) throws java.lang.Exception
Description copied from interface:ReportEntryPlugin
Extracts a piece of information from the source in arguments.If the source contains localized data, it will be extracted for the specified locale or a less specific if not found.
- Specified by:
extract
in interfaceReportEntryPlugin<Project>
- Parameters:
project
- the source to inspect, must not benull
locale
- theString
representation of aLocale
, must not benull
- Returns:
- a DTO representation or
null
if no data is available - Throws:
java.lang.Exception
-
-