de.smartics.exceptions.report.generator
Class HtmlReportGenerator

Package class diagram package HtmlReportGenerator
java.lang.Object
  extended by de.smartics.exceptions.report.generator.AbstractReportGenerator<O>
      extended by de.smartics.exceptions.report.generator.AbstractOutputReportGenerator<XMLStreamWriter>
          extended by de.smartics.exceptions.report.generator.AbstractXmlReportGenerator
              extended by de.smartics.exceptions.report.generator.AbstractHtmlReportGenerator
                  extended by de.smartics.exceptions.report.generator.HtmlReportGenerator
All Implemented Interfaces:
ReportGenerator< XMLStreamWriter>

public class HtmlReportGenerator
     
     
extends AbstractHtmlReportGenerator

Simple generator that generates a HTML file for exception codes.


Field Summary
 
Fields inherited from class de.smartics.exceptions.report.generator.AbstractReportGenerator
encoding, output, renderer
 
Fields inherited from interface de.smartics.exceptions.report.generator.ReportGenerator
DEFAULT_ENCODING
 
Constructor Summary
HtmlReportGenerator()
          Default constructor.
 
Method Summary
protected  String getCodeTitle(String headLine, ExceptionCodeReportItem item)
          Returns the title to be set for the report item.
protected  String getCurrentSelection(ExceptionCodeReportItem item)
          Returns the selection criteria for creating subsections in the report.
protected  List<ExceptionCodeReportItem> getItems(StoredExceptionCodesReport report)
          Returns the list of exception code items sorted as defined by the report.
protected  boolean hasSectionChanged(String currentSection, ExceptionCodeReportItem item)
          Determines if the section has changed for the new item.
 void writeReport(ProjectConfiguration<XMLStreamWriter> config, StoredExceptionCodesReport report)
          Writes the report with the given information.
protected  void writeReportElementInfo(XMLStreamWriter xmlWriter, ProjectConfiguration<XMLStreamWriter> config, ExceptionCodeReportItem item)
          Writes the given report element information.
protected  void writeTableHeader(XMLStreamWriter xmlWriter, ProjectConfiguration<XMLStreamWriter> config)
          Writes the table header for the report elements set.
 
Methods inherited from class de.smartics.exceptions.report.generator.AbstractHtmlReportGenerator
writeContent, writeInfoFooter, writeInfoHeader
 
Methods inherited from class de.smartics.exceptions.report.generator.AbstractXmlReportGenerator
createOutput
 
Methods inherited from class de.smartics.exceptions.report.generator.AbstractOutputReportGenerator
write, writeFooter, writeHeader, writeInfoSubHeader
 
Methods inherited from class de.smartics.exceptions.report.generator.AbstractReportGenerator
getEncoding, getOutput, setEncoding, setOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlReportGenerator

public HtmlReportGenerator()
Default constructor.

See Also:
AbstractHtmlReportGenerator#AbstractHtmlReportGenerator()
Method Detail

writeTableHeader

protected void writeTableHeader(XMLStreamWriter xmlWriter,
                                ProjectConfiguration<XMLStreamWriter> config)
                         throws XMLStreamException
Writes the table header for the report elements set.

Specified by:
writeTableHeader in class AbstractOutputReportGenerator<XMLStreamWriter>
Parameters:
xmlWriter - the writer to write to.
config - the project configuration to control the output.
Throws:
XMLStreamException

writeReportElementInfo

protected void writeReportElementInfo(XMLStreamWriter xmlWriter,
                                      ProjectConfiguration<XMLStreamWriter> config,
                                      ExceptionCodeReportItem item)
                               throws Exception
Writes the given report element information.

Specified by:
writeReportElementInfo in class AbstractOutputReportGenerator<XMLStreamWriter>
Parameters:
xmlWriter - the writer to write to.
config - the project configuration to control the output.
item - the report element information to write.
Throws:
Exception - on any problem encountered.

writeReport

public void writeReport(ProjectConfiguration<XMLStreamWriter> config,
                        StoredExceptionCodesReport report)
                 throws ReportException
Description copied from class: AbstractXmlReportGenerator
Writes the report with the given information.

Specified by:
writeReport in interface ReportGenerator<XMLStreamWriter>
Overrides:
writeReport in class AbstractXmlReportGenerator
Parameters:
config - the project configuration to control the report generation.
report - the information to write.
Throws:
ReportException - on any problem generating the report.

getItems

protected List<ExceptionCodeReportItem> getItems(StoredExceptionCodesReport report)
Description copied from class: AbstractOutputReportGenerator
Returns the list of exception code items sorted as defined by the report.

Specified by:
getItems in class AbstractOutputReportGenerator<XMLStreamWriter>
Parameters:
report - the report to access further information.
Returns:
the list of sorted items.

hasSectionChanged

protected boolean hasSectionChanged(String currentSection,
                                    ExceptionCodeReportItem item)
Description copied from class: AbstractOutputReportGenerator
Determines if the section has changed for the new item.

Specified by:
hasSectionChanged in class AbstractOutputReportGenerator<XMLStreamWriter>
Parameters:
currentSection - the identifier of the current section.
item - the next item to be rendered.
Returns:
if the next item is part of the current section, false is returned. If it is part of a new section, true is returned.

getCurrentSelection

protected String getCurrentSelection(ExceptionCodeReportItem item)
Description copied from class: AbstractOutputReportGenerator
Returns the selection criteria for creating subsections in the report.

Specified by:
getCurrentSelection in class AbstractOutputReportGenerator<XMLStreamWriter>
Parameters:
item - the item to determine the criteria.
Returns:
the criteria in its text form.

getCodeTitle

protected String getCodeTitle(String headLine,
                              ExceptionCodeReportItem item)
Description copied from class: AbstractOutputReportGenerator
Returns the title to be set for the report item.

Specified by:
getCodeTitle in class AbstractOutputReportGenerator<XMLStreamWriter>
Parameters:
headLine - a proposed headline by the caller. May be overridden.
item - the item to construct a headline for.
Returns:
the title for the new section.


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