@NotThreadSafe
public class ReportGenerator
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ReportGenerator.Format
An enumeration of the report formats.
|
| Constructor and Description |
|---|
ReportGenerator(java.lang.String applicationName,
java.util.List<Dependency> dependencies,
java.util.List<Analyzer> analyzers,
DatabaseProperties properties,
Settings settings)
|
ReportGenerator(java.lang.String applicationName,
java.util.List<Dependency> dependencies,
java.util.List<Analyzer> analyzers,
DatabaseProperties properties,
Settings settings,
ExceptionCollection exceptions)
Constructs a new ReportGenerator.
|
ReportGenerator(java.lang.String applicationName,
java.lang.String groupID,
java.lang.String artifactID,
java.lang.String version,
java.util.List<Dependency> dependencies,
java.util.List<Analyzer> analyzers,
DatabaseProperties properties,
Settings settings)
|
ReportGenerator(java.lang.String applicationName,
java.lang.String groupID,
java.lang.String artifactID,
java.lang.String version,
java.util.List<Dependency> dependencies,
java.util.List<Analyzer> analyzers,
DatabaseProperties properties,
Settings settings,
ExceptionCollection exceptions)
Constructs a new ReportGenerator.
|
| Modifier and Type | Method and Description |
|---|---|
static java.io.File |
getReportFile(java.lang.String outputLocation,
ReportGenerator.Format format)
Determines the report file name based on the give output location and
format.
|
protected void |
processTemplate(java.lang.String template,
java.io.File file)
Generates a report from a given Velocity Template.
|
protected void |
processTemplate(java.lang.String templateName,
java.io.OutputStream outputStream)
Generates a report from a given Velocity Template.
|
void |
write(java.lang.String outputLocation,
ReportGenerator.Format format)
Writes the dependency-check report(s).
|
void |
write(java.lang.String outputLocation,
java.lang.String format)
Writes the dependency-check report to the given output location.
|
@Deprecated
public ReportGenerator(java.lang.String applicationName,
java.util.List<Dependency> dependencies,
java.util.List<Analyzer> analyzers,
DatabaseProperties properties,
Settings settings)
ReportGenerator(java.lang.String, java.util.List, java.util.List, DatabaseProperties, Settings, ExceptionCollection)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(java.lang.String applicationName,
java.util.List<Dependency> dependencies,
java.util.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(java.lang.String applicationName,
java.lang.String groupID,
java.lang.String artifactID,
java.lang.String version,
java.util.List<Dependency> dependencies,
java.util.List<Analyzer> analyzers,
DatabaseProperties properties,
Settings settings)
ReportGenerator(String, String, String, String, List, List, DatabaseProperties, Settings, ExceptionCollection)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(java.lang.String applicationName,
java.lang.String groupID,
java.lang.String artifactID,
java.lang.String version,
java.util.List<Dependency> dependencies,
java.util.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(java.lang.String outputLocation,
java.lang.String format)
throws ReportException
outputLocation - the path where the reports should be writtenformat - the format the report should be written in (a valid member
of ReportGenerator.Format) 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(java.lang.String outputLocation,
ReportGenerator.Format format)
throws ReportException
outputLocation - the path where the reports should be writtenformat - the format the report should be written in (see
ReportGenerator.Format)ReportException - is thrown if there is an error creating out the
reportspublic static java.io.File getReportFile(java.lang.String outputLocation,
ReportGenerator.Format format)
outputLocation - the specified output locationformat - the report formatprotected void processTemplate(java.lang.String template,
java.io.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(java.lang.String templateName,
java.io.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-21 Jeremy Long. All Rights Reserved.