1
package org.hisp.dhis.reporting.dataset.generators;
4
* Copyright (c) 2004-2007, University of Oslo
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions are met:
9
* * Redistributions of source code must retain the above copyright notice, this
10
* list of conditions and the following disclaimer.
11
* * Redistributions in binary form must reproduce the above copyright notice,
12
* this list of conditions and the following disclaimer in the documentation
13
* and/or other materials provided with the distribution.
14
* * Neither the name of the HISP project nor the names of its contributors may
15
* be used to endorse or promote products derived from this software without
16
* specific prior written permission.
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
import java.io.InputStream;
31
import java.util.Collection;
32
import java.util.SortedMap;
34
import org.hisp.dhis.reporting.dataset.report.ChartElement;
37
* @author Lars Helge Overland
38
* @version $Id: ReportGenerator.java 5138 2008-05-12 15:05:47Z larshelg $
40
public interface ReportGenerator
43
* Generates a Jasper report preview.
44
* @param reportName Name of the report
45
* @param reportElements The elements to include in the report
46
* @param chartElements The elements to include in the chart
47
* @return A report in a html string
48
* @throws GeneratorException
50
String generateReportPreview( String reportName, SortedMap<String, String> reportElements,
51
Collection<ChartElement> chartElements )
52
throws GeneratorException;
55
* Generates a Jasper report PDF file.
56
* @param reportName Name of the report
57
* @param reportElements The elements to include in the report
58
* @param chartElements The elements to include in the chart
59
* @throws GeneratorException
61
void generateReportFile( String reportName, SortedMap<String, String> reportElements,
62
Collection<ChartElement> chartElements )
63
throws GeneratorException;
66
* Generates a Jasper report stream for download.
67
* @param reportName Name of the report
68
* @param reportElements The elements to include in the report
69
* @param chartElements The elements to include in the chart
70
* @return A inputstream containg a report
71
* @throws GeneratorException
73
InputStream generateReportStream( String reportName, SortedMap<String, String> reportElements,
74
Collection<ChartElement> chartElements )
75
throws GeneratorException;