KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > displaytag > export > ExportView


1 /**
2  * Licensed under the Artistic License; you may not use this file
3  * except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://displaytag.sourceforge.net/license.html
7  *
8  * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
9  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11  */

12 package org.displaytag.export;
13
14 import org.displaytag.model.TableModel;
15
16
17 /**
18  * Interface for export classes. ExportViewFactory is responsible for registering and initialization of export views. A
19  * default, no parameters constructor is required. The <code>setParameters()</code> method is guarantee to be called
20  * before any other operation.
21  * @author Fabrizio Giustina
22  * @version $Revision: 720 $ ($Author: fgiust $)
23  */

24 public interface ExportView
25 {
26
27     /**
28      * initialize the parameters needed for export. The method is guarantee be called before <code>doExport()</code>
29      * and <code>getMimeType()</code>. Classes implementing ExportView should reset any instance field previously set
30      * when this method is called, in order to support instance reusing.
31      * @param tableModel TableModel to render
32      * @param exportFullList boolean export full list?
33      * @param includeHeader should header be included in export?
34      * @param decorateValues should output be decorated?
35      */

36     void setParameters(TableModel tableModel, boolean exportFullList, boolean includeHeader, boolean decorateValues);
37
38     /**
39      * MimeType to return.
40      * @return String mime type
41      */

42     String JavaDoc getMimeType();
43
44 }
45
Popular Tags