Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.owasp.dependencycheck.reporting
Class ReportGenerator

    java.lang.Object
      org.owasp.dependencycheck.reporting.ReportGenerator

    public class ReportGenerator

extends Object

The ReportGenerator is used to, as the name implies, generate reports. Internally the generator uses the Velocity Templating Engine. The ReportGenerator exposes a list of Dependencies to the template when generating the report.

Author:
  Jeremy Long (jeremy.long@owasp.org)

Nested Class Summary
`static class` | `ReportGenerator.Format` An enumeration of the report formats.

Constructor Summary
`ReportGenerator(String applicationName, List<Dependency> dependencies, List<Analyzer> analyzers)` Constructs a new ReportGenerator.

Method Summary
`protected void` | `generateReport(String templateName, String outFileName)` Generates a report from a given Velocity Template.
`void` | `generateReports(String outputDir, ReportGenerator.Format format)` Generates the Dependency Reports for the identified dependencies.
`void` | `generateReports(String outputDir, String outputFormat)` Generates the Dependency Reports for the identified dependencies.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ReportGenerator

    public ReportGenerator(String applicationName,
                           List<Dependency> dependencies,
                           List<Analyzer> analyzers)

  Constructs a new ReportGenerator.

  Parameters:
    `applicationName` - the application name being analyzed
    `dependencies` - the list of dependencies
    `analyzers` - the list of analyzers used.

Method Detail

### generateReports

    public void generateReports(String outputDir,
                                ReportGenerator.Format format)
                         throws IOException,
                                Exception

  Generates the Dependency Reports for the identified dependencies.

  Parameters:
    `outputDir` - the path where the reports should be written
    `format` - the format the report should be written in
  Throws:
    `IOException` - is thrown when the template file does not exist
    `Exception` - is thrown if there is an error writing out the reports.

### generateReports

    public void generateReports(String outputDir,
                                String outputFormat)
                         throws IOException,
                                Exception

  Generates the Dependency Reports for the identified dependencies.

  Parameters:
    `outputDir` - the path where the reports should be written
    `outputFormat` - the format the report should be written in (XML, HTML, ALL)
  Throws:
    `IOException` - is thrown when the template file does not exist
    `Exception` - is thrown if there is an error writing out the reports.

### generateReport

    protected void generateReport(String templateName,
                                  String outFileName)
                           throws IOException,
                                  Exception

  Generates a report from a given Velocity Template. The template name provided can be the name of a template contained in the jar file, such as 'XmlReport' or 'HtmlReport', or the template name can be the path to a template file.

  Parameters:
    `templateName` - the name of the template to load.
    `outFileName` - the filename and path to write the report to.
  Throws:
    `IOException` - is thrown when the template file does not exist.
    `Exception` - is thrown when an exception occurs.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012-2013 OWASP. All Rights Reserved.