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 placed
public 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 set
file - is a file where report should be placed
public IReportDecorator getDecorator()
IReportDecorator of the publisher.
public void setDecorator(IReportDecorator decorator)
IReportDecorator to the publisher.
decorator - is a report decorator to set
public File getFile()
public void setFile(File file)
file - is a new file
public void publishReport(List<ReportMessage> messages) throws IOException
DefaultReportBuilder and saves it to file.
publishReport in interface IReportPublisher
messages - is a list of ReportMessage to publish
IOException - if any IO issue occurs
Copyright © 1998–2020 iText Group NV. All rights reserved.