de.smartics.exceptions.report.generator
Interface ReportGenerator<O>

Package class diagram package ReportGenerator
Type Parameters:
O - the type of expected output instance.
All Known Implementing Classes:
AbstractHtmlReportGenerator, AbstractOutputReportGenerator, AbstractReportGenerator, AbstractXmlReportGenerator, HtmlReportGenerator

public interface ReportGenerator<O>

Defines the properties of a report generator.


Field Summary
static String DEFAULT_ENCODING
          The default encoding to use if none is explicitly set, but the reporter demands one.
 
Method Summary
 String getEncoding()
          Returns the encoding to use.
 O getOutput()
          Returns the output instance currently set.
 void setEncoding(String encoding)
          Sets the encoding to use by the reporter.
 void setOutput(O output)
          Sets the output the reporter will use to generate the report.
 void writeReport(ProjectConfiguration<O> config, StoredExceptionCodesReport report)
          Writes the report with the given information.
 

Field Detail

DEFAULT_ENCODING

static final String DEFAULT_ENCODING
The default encoding to use if none is explicitly set, but the reporter demands one.

The value of this constant is "UTF-8".

Constant Field Value:
"UTF-8"
Method Detail

writeReport

void writeReport(ProjectConfiguration<O> config,
                 StoredExceptionCodesReport report)
                 throws ReportException
Writes the report with the given information.

Parameters:
config - the project configuration to control the report generation.
report - the information to write.
Throws:
ReportException - on any problem generating the report.

getOutput

O getOutput()
Returns the output instance currently set.

Returns:
the output instance currently set, may be null if still not set.

setOutput

void setOutput(O output)
               throws NullPointerException,
                      IllegalArgumentException
Sets the output the reporter will use to generate the report.

The instance is report specific and may be a Writer or a StringBuffer.

Parameters:
output - the output instance.
Throws:
NullPointerException - if the output is null.
IllegalArgumentException - if the implementation does not know how to handle the instance.

getEncoding

String getEncoding()
Returns the encoding to use. If encoding is explicitly set and the reporter demands one, the default encoding is used.

Returns:
the default encoding the reporter will use.

setEncoding

void setEncoding(String encoding)
Sets the encoding to use by the reporter.

The allowed values are platform dependent and are defined by the java.io package.

Parameters:
encoding - the encoding to use by the reporter.


Copyright © 2007-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.