1 /*
2 * JaspertReports JSF Plugin Copyright (C) 2011 A. Alonso Dominguez
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or (at
7 * your option) any later version. This library is distributed in the hope
8 * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
9 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 *
11 * See the GNU Lesser General Public License for more details. You should have
12 * received a copy of the GNU Lesser General Public License along with this
13 * library; if not, write to the Free Software Foundation, Inc., 59 Temple
14 * Place, Suite 330, Boston, MA 02111-1307 USA A.
15 *
16 * Alonso Dominguez
17 * alonsoft@users.sf.net
18 */
19 package net.sf.jasperreports.jsf.engine;
20
21 import java.io.IOException;
22 import java.io.OutputStream;
23 import java.util.Collection;
24
25 import javax.faces.context.FacesContext;
26
27 import net.sf.jasperreports.jsf.component.UIReport;
28 import net.sf.jasperreports.jsf.context.ContentType;
29
30 /**
31 * The Exporter interface.
32 *
33 * @author A. Alonso Dominguez
34 */
35 public interface Exporter {
36
37 /**
38 * Content type of the output generated by this exporter.
39 *
40 * @return the exporter's content type.
41 */
42 public abstract Collection<ContentType> getContentTypes();
43
44 /**
45 * Export.
46 *
47 * @param context the context
48 * @param component the report component
49 * @param stream the stream
50 *
51 * @throws IOException Signals that an I/O exception has occurred.
52 * @throws ExporterException the exporter exception
53 */
54 public void export(final FacesContext context,
55 final UIReport component, final OutputStream stream)
56 throws IOException, ExporterException;
57
58 }