public class FileReportPublisher extends Object implements IReportPublisher
Constructor and Description |
---|
FileReportPublisher(File file)
Creates a new instance of ReportPublisher with
DefaultReportDecorator as a decorator
and with SeverityLevel.INFO as a minimal severity level. |
FileReportPublisher(IReportDecorator decorator,
File file)
Creates a new instance of ReportPublisher with provided
IReportDecorator , a minimal
severity level and a path to a file with the report. |
Modifier and Type | Method and Description |
---|---|
IReportDecorator |
getDecorator()
Gets
IReportDecorator of the publisher. |
File |
getFile()
Gets the file where report should be placed.
|
void |
publishReport(List<ReportMessage> messages)
Generates report based on
DefaultReportBuilder and saves it to file. |
void |
setDecorator(IReportDecorator decorator)
Sets
IReportDecorator to the publisher. |
void |
setFile(File file)
Sets the file where report should be placed.
|
public FileReportPublisher(File file)
DefaultReportDecorator
as a decorator
and with SeverityLevel.INFO
as a minimal severity level.file
- is a file where report should be placedpublic FileReportPublisher(IReportDecorator decorator, File file)
IReportDecorator
, a minimal
severity level and a path to a file with the report.decorator
- is a report decorator to setfile
- is a file where report should be placedpublic IReportDecorator getDecorator()
IReportDecorator
of the publisher.public void setDecorator(IReportDecorator decorator)
IReportDecorator
to the publisher.decorator
- is a report decorator to setpublic File getFile()
public void setFile(File file)
file
- is a new filepublic void publishReport(List<ReportMessage> messages) throws IOException
DefaultReportBuilder
and saves it to file.publishReport
in interface IReportPublisher
messages
- is a list of ReportMessage
to publishIOException
- if any IO issue occursCopyright © 1998–2024 iText Group NV. All rights reserved.