org.schmant.report
Interface ReportFactory

All Known Implementing Classes:
AsynchronousStdoutReportFactory, FileReportFactory, OverwritingFileReportFactory, StdoutReportFactory

public interface ReportFactory

The ReportManager uses a ReportFactory instance to create the Report to use when running the Schmant script.

Implementations of this interface must have a zero-argument constructor. If they need configuration parameters to configure themselves they may use system properties.

Since:
0.5
Author:
Karl Gustafsson
See Also:
Report, ReportManager

Method Summary
 Report newReport(String identifier)
          Create a new Report instance.
 void setReportLineFormatter(ReportLineFormatter llf)
          Set the ReportLineFormatter to use for Report objects created from this factory.
 

Method Detail

setReportLineFormatter

void setReportLineFormatter(ReportLineFormatter llf)
Set the ReportLineFormatter to use for Report objects created from this factory. This must be set before any Report:s are created.

All ReportFactory implementations are required to use a default ReportLineFormatter (probably the SimpleReportLineFormatter) if no other formatter is set.

Parameters:
llf - The new log line formatter.

newReport

Report newReport(String identifier)
Create a new Report instance.

Parameters:
identifier - A unique identifier for the instance (for identifying messages logged from different execution threads), or null for no identifier.
Returns:
A new Report instance.