sos.reports
Interface ReportTemplate

All Known Implementing Classes:
AbstractReportTemplate, TableReportTemplate

public interface ReportTemplate

A named template that can generate reports and recommend themes.

Since:
1.0
See Also:
Report

Method Summary
 Report createReport(java.lang.Object content)
          Creates a report with the specified content and with the default theme.
 Report createReport(java.lang.Object content, Theme theme)
          Creates a report with the specified content and theme.
 Theme getDefaultTheme()
          Returns the default report theme compatible with reports generated by this template.
 java.lang.String getName()
          Returns a localized name of this report template.
 java.util.Set getThemes()
          Returns a set of themes compatible with this template's reports.
 

Method Detail

createReport

public Report createReport(java.lang.Object content)
                    throws java.lang.IllegalArgumentException
Creates a report with the specified content and with the default theme.

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:
createReport(Object,Theme)

createReport

public Report createReport(java.lang.Object content,
                           Theme theme)
                    throws java.lang.IllegalArgumentException,
                           java.lang.NullPointerException
Creates a report with the specified content and theme.

Parameters:
content - content of the report to be generated
theme - theme of the report to be generated
Returns:
a non-null report with the specified content and based on the specified theme
Throws:
java.lang.IllegalArgumentException - if content is not appropriate (wrong class, e.g.) for the reports generated by this template
java.lang.NullPointerException - if theme is null

getDefaultTheme

public Theme getDefaultTheme()
Returns the default report theme compatible with reports generated by this template.

Returns:
the default report theme (may not be null)

getName

public java.lang.String getName()
Returns a localized name of this report template.

Returns:
this template's name

getThemes

public java.util.Set getThemes()
Returns a set of themes compatible with this template's reports.

Returns:
a set of themes compatible with this template's reports


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