@NotThreadSafe public class ReportGenerator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ReportGenerator.Format
An enumeration of the report formats.
|
| Constructor and Description |
|---|
ReportGenerator(String applicationName,
List<Dependency> dependencies,
List<Analyzer> analyzers,
DatabaseProperties properties,
Settings settings)
|
ReportGenerator(String applicationName,
List<Dependency> dependencies,
List<Analyzer> analyzers,
DatabaseProperties properties,
Settings settings,
ExceptionCollection exceptions)
Constructs a new ReportGenerator.
|
ReportGenerator(String applicationName,
String groupID,
String artifactID,
String version,
List<Dependency> dependencies,
List<Analyzer> analyzers,
DatabaseProperties properties,
Settings settings)
|
ReportGenerator(String applicationName,
String groupID,
String artifactID,
String version,
List<Dependency> dependencies,
List<Analyzer> analyzers,
DatabaseProperties properties,
Settings settings,
ExceptionCollection exceptions)
Constructs a new ReportGenerator.
|
| Modifier and Type | Method and Description |
|---|---|
static File |
getReportFile(String outputLocation,
ReportGenerator.Format format)
Determines the report file name based on the give output location and
format.
|
protected void |
processTemplate(String template,
File file)
Generates a report from a given Velocity Template.
|
protected void |
processTemplate(String templateName,
OutputStream outputStream)
Generates a report from a given Velocity Template.
|
void |
write(String outputLocation,
ReportGenerator.Format format)
Writes the dependency-check report(s).
|
void |
write(String outputLocation,
String format)
Writes the dependency-check report to the given output location.
|
@Deprecated public ReportGenerator(String applicationName, List<Dependency> dependencies, List<Analyzer> analyzers, DatabaseProperties properties, Settings settings)
applicationName - the application name being analyzeddependencies - the list of dependenciesanalyzers - the list of analyzers usedproperties - the database properties (containing timestamps of the
NVD CVE data)settings - a reference to the database settingspublic ReportGenerator(String applicationName, List<Dependency> dependencies, List<Analyzer> analyzers, DatabaseProperties properties, Settings settings, ExceptionCollection exceptions)
applicationName - the application name being analyzeddependencies - the list of dependenciesanalyzers - the list of analyzers usedproperties - the database properties (containing timestamps of the
NVD CVE data)settings - a reference to the database settingsexceptions - a collection of exceptions that may have occurred
during the analysis@Deprecated public ReportGenerator(String applicationName, String groupID, String artifactID, String version, List<Dependency> dependencies, List<Analyzer> analyzers, DatabaseProperties properties, Settings settings)
applicationName - the application name being analyzedgroupID - the group id of the project being analyzedartifactID - the application id of the project being analyzedversion - the application version of the project being analyzeddependencies - the list of dependenciesanalyzers - the list of analyzers usedproperties - the database properties (containing timestamps of the
NVD CVE data)settings - a reference to the database settingspublic ReportGenerator(String applicationName, String groupID, String artifactID, String version, List<Dependency> dependencies, List<Analyzer> analyzers, DatabaseProperties properties, Settings settings, ExceptionCollection exceptions)
applicationName - the application name being analyzedgroupID - the group id of the project being analyzedartifactID - the application id of the project being analyzedversion - the application version of the project being analyzeddependencies - the list of dependenciesanalyzers - the list of analyzers usedproperties - the database properties (containing timestamps of the
NVD CVE data)settings - a reference to the database settingsexceptions - a collection of exceptions that may have occurred
during the analysispublic void write(String outputLocation, String format) throws ReportException
outputLocation - the path where the reports should be writtenformat - the format the report should be written in (XML, HTML,
JSON, CSV, ALL) or even the path to a custom velocity template (either
fully qualified or the template name on the class path).ReportException - is thrown if there is an error creating out the
reportspublic void write(String outputLocation, ReportGenerator.Format format) throws ReportException
outputLocation - the path where the reports should be writtenformat - the format the report should be written in (XML, HTML, ALL)ReportException - is thrown if there is an error creating out the
reportspublic static File getReportFile(String outputLocation, ReportGenerator.Format format)
outputLocation - the specified output locationformat - the report formatprotected void processTemplate(String template, File file) throws ReportException
template - the name of the template to loadfile - the output file to write the report toReportException - is thrown when the report cannot be generatedprotected void processTemplate(String templateName, OutputStream outputStream) throws ReportException
templateName - the name of the template to loadoutputStream - the OutputStream to write the report toReportException - is thrown when an exception occursCopyright © 2012–2020 OWASP. All rights reserved.