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

## com.sun.javatest.report
Class Report

    java.lang.Object
      com.sun.javatest.report.Report

    public class Report

extends java.lang.Object

A report generator for sets of test results.

Nested Class Summary
`static interface` | `Report.CustomReportManager`
`static class` | `Report.Settings` Specify what parts of the reports to generate.
`static interface` | `Report.StartGenListener`

Field Summary
`static java.lang.String` | `INDEX_FILE_NAME`
`static java.lang.String` | `MARKER_FILE_NAME`

Constructor Summary
`Report()`
`Report(InterviewParameters params, java.io.File dir)` Deprecated. It is expected that you call writeReport() if you use this constructor.
`Report(InterviewParameters params, java.io.File dir, TestFilter tf)` Deprecated. It is expected that you call writeReport() if you use this constructor.

Method Summary
`void` | `addStartGenListener(Report.StartGenListener l)`
`java.io.File[]` | `checkExistingFiles()` Checks whether writing this report will overwrite any existinng files.
`static java.lang.String[]` | `getFilenamesUsed()` Returns all filenames that may be used when creating a report of any type (HTML, plain text, XML, etc...).
`static java.lang.String[]` | `getHtmlReportFilenames()`
`static java.lang.String[]` | `getPlainReportFilenames()`
`java.io.File` | `getReportDir()` Gets the report directory that is currently defined.
`static Report.Settings` | `getSettingsPrefs()`
`static boolean` | `isReportDirectory(java.io.File d)` Checks if the input directory contains JT Harness reports.
`void` | `removeStartGeneratingListener(Report.StartGenListener l)`
`static void` | `writePrefs(Report.Settings s)`
`void` | `writeReport()` Deprecated. Use `writeReport(Settings, File)` It is expected that you use a deprecated constructor if you use this method.
`void` | `writeReport(Report.Settings s, java.io.File dir)` Write report files using the given settings, to the given location.
`void` | `writeReport(java.lang.String type)` New entry point for batch mode (only).
`void` | `writeReports(Report.Settings s, java.io.File dir, java.util.Collection customReports)`

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

Field Detail

### MARKER_FILE_NAME

    public static final java.lang.String MARKER_FILE_NAME

See Also:
  Constant Field Values

### INDEX_FILE_NAME

    public static final java.lang.String INDEX_FILE_NAME

See Also:
  Constant Field Values

Constructor Detail

### Report

    public Report()

### Report

    public Report(InterviewParameters params,
                  java.io.File dir)

  Deprecated. It is expected that you call writeReport() if you use this constructor.

  Creates and initializes an instance of the report generator.

  Parameters:
    `params` - Configuration parameters to be included in the report.
    `dir` - The directory to which to write the report.

### Report

    public Report(InterviewParameters params,
                  java.io.File dir,
                  TestFilter tf)

  Deprecated. It is expected that you call writeReport() if you use this constructor.

  Creates and initializes an instance of the report generator.

  Parameters:
    `params` - Configuration parameters to be included in the report.
    `dir` - The directory to which to write the report.
    `tf` - The test filter to be used to filter out tests in the report.

Method Detail

### checkExistingFiles

    public java.io.File[] checkExistingFiles()

  Checks whether writing this report will overwrite any existinng files.

  Returns:
    an array of files that will be overrwritten, or null if none.

### writeReport

    public void writeReport(Report.Settings s,
                            java.io.File dir)
                     throws java.io.IOException

  Write report files using the given settings, to the given location. This is the execution entry point for GUI mode. The settings used are written into the JT Harness preferences automatically at the end of this method, unless this method exits with an exception.

  Throws:
    `java.io.IOException`

### writeReports

    public void writeReports(Report.Settings s,
                             java.io.File dir,
                             java.util.Collection customReports)
                      throws java.io.IOException

  Throws:
    `java.io.IOException`

### writeReport

    public void writeReport()
                     throws java.io.IOException

  Deprecated. Use `writeReport(Settings, File)` It is expected that you use a deprecated constructor if you use this method.

  Writes a report about a set of test results. This is the execution entry point for batch mode. The default settings from the preferences will be used.

  Throws:
    `java.io.IOException` - if the is a problem while writing the reports.

### writeReport

    public void writeReport(java.lang.String type)
                     throws java.io.IOException

  New entry point for batch mode (only).

  Parameters:
    `type` - The report type identifier, may be a custom type.
  Throws:
    `java.lang.IllegalArgumentException` - if the type parameter does not identify a proper report type.
    `java.io.IOException`

### isReportDirectory

    public static boolean isReportDirectory(java.io.File d)

  Checks if the input directory contains JT Harness reports.

  Parameters:
    `d` - The directory to be checked.
  Returns:
    true if the directory contains JT Harness reports.

### getReportDir

    public java.io.File getReportDir()

  Gets the report directory that is currently defined.

  Returns:
    The report directory.

### getHtmlReportFilenames

    public static java.lang.String[] getHtmlReportFilenames()

### getPlainReportFilenames

    public static java.lang.String[] getPlainReportFilenames()

### getFilenamesUsed

    public static java.lang.String[] getFilenamesUsed()

  Returns all filenames that may be used when creating a report of any type (HTML, plain text, XML, etc...).

### writePrefs

    public static void writePrefs(Report.Settings s)

### getSettingsPrefs

    public static Report.Settings getSettingsPrefs()

### addStartGenListener

    public void addStartGenListener(Report.StartGenListener l)

### removeStartGeneratingListener

    public void removeStartGeneratingListener(Report.StartGenListener l)

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 (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.