Source code: com/dghda/kent/Report.java
1 /* Copyright (C) 2001 Duane Griffin <duanegriffin@users.sourceforge.net>
2 This file is part of Kent.
3
4 Kent is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 Kent is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
13
14 You should have received a copy of the GNU General Public
15 License along with Kent; see the file COPYING. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA.
18 */
19
20 package com.dghda.kent;
21
22 /**
23 The interface all reports must implement.
24
25 A report's output consists of a report template and report data. The
26 template contains layout and formatting information (which will not change
27 between runs), while the data is the row and column information, which will
28 tend to change between runs. Both the template and the data may be affected
29 by altering report configuration settings.
30
31 The template/data seperation is similar to that in the Kugar application (a
32 part of the KOffice suite).
33
34 The report template document structure is described in the file
35 dtd/template.dtd.
36 */
37 public interface Report extends KentModule {
38
39 /**
40 Returns the report template with the given configuration options.
41 @see com.dghda.kent.ReportTemplate ReportTemplate
42 @param config The configuration to use when running the report.
43 @returns An XML document containing the results of the report.
44 */
45 public String getReportTemplate (java.util.Properties config) throws ReportingException;
46
47 /**
48 Runs the report with the given configuration options.
49 The XML returned will be processed in accordance with the report's template.
50 @param config The configuration to use when running the report.
51 @returns An XML document containing the results of the report.
52 */
53 public String getReportData (java.util.Properties config) throws ReportingException;
54 }