sos.reports
Class AbstractReportTemplate

java.lang.Object
  |
  +--sos.reports.AbstractReportTemplate
All Implemented Interfaces:
ReportTemplate
Direct Known Subclasses:
TableReportTemplate

public abstract class AbstractReportTemplate
extends java.lang.Object
implements ReportTemplate

A partial implementation of the ReportTemplate interface. Subclasses must implement:

Subclasses that provide one or more themes should also implement:

Themes

This If the cell straddles multiple rows or columns, then substitute row1,col1,row2,col2 for row,col in the above algorithm.

Since:
1.0

Constructor Summary
protected AbstractReportTemplate()
          Creates an instance of AbstractReportTemplate.
 
Method Summary
 Report createReport(java.lang.Object content)
          Creates a report with the specified content and with the default theme.
 Theme getDefaultTheme()
          Returns the default report theme compatible with reports generated by this template.
 java.util.Set getThemes()
          Returns a set of themes compatible with this template's reports.
 java.lang.String toString()
          Returns a string representation of this theme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface sos.reports.ReportTemplate
createReport, getName
 

Constructor Detail

AbstractReportTemplate

protected AbstractReportTemplate()
Creates an instance of AbstractReportTemplate.

Method Detail

createReport

public Report createReport(java.lang.Object content)
                    throws java.lang.IllegalArgumentException
Description copied from interface: ReportTemplate
Creates a report with the specified content and with the default theme.

Specified by:
createReport in interface ReportTemplate
Parameters:
content - content of the report to be generated
Returns:
a non-null report with the specified content
Throws:
java.lang.IllegalArgumentException - if content is not appropriate (wrong class, e.g.) for the reports generated by this template
See Also:
ReportTemplate.createReport(Object,Theme)

getDefaultTheme

public Theme getDefaultTheme()
Description copied from interface: ReportTemplate
Returns the default report theme compatible with reports generated by this template.

Specified by:
getDefaultTheme in interface ReportTemplate
Returns:
the default report theme (may not be null)

getThemes

public java.util.Set getThemes()
Description copied from interface: ReportTemplate
Returns a set of themes compatible with this template's reports.

Specified by:
getThemes in interface ReportTemplate
Returns:
a set of themes compatible with this template's reports

toString

public java.lang.String toString()
Returns a string representation of this theme.

Overrides:
toString in class java.lang.Object
Returns:
this theme's name


Copyright 2003, 2004 Side of Software (SOS). All rights reserved.