Package com.groiss.reporting.export
Class DownloadExporter<T>
java.lang.Object
com.groiss.reporting.export.HTMLExporter
com.groiss.reporting.export.DownloadExporter<T>
- All Implemented Interfaces:
ClientSideExporter
,FileReportingExporter
,ReportingExporter
- Direct Known Subclasses:
DelimiterSeperatedValuesExporter
Abstract subclass of HTMLExporter. Implement this class to provide export object as download.
Class provides methods to download
-
Field Summary
Fields inherited from interface com.groiss.reporting.export.ReportingExporter
ROW_STYLE_HIDDEN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
download
(HttpServletRequest req, HttpServletResponse res) Implement this method to provide download.abstract T
returns the Object which is generated by this Exporter called by abstract Class DownloadExpoerteradd configureable fields...protected final String
gets the filename from the request or the sessionprotected String
getFileName
(Query q) toJson
(Query q, ReportingTableModel tm) Methods inherited from class com.groiss.reporting.export.HTMLExporter
generateMatrixTable, getExportName, getHeaderInfos, getResultDetailsJson
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.groiss.reporting.export.FileReportingExporter
getFileTypeExtension
Methods inherited from interface com.groiss.reporting.export.ReportingExporter
getExportName
-
Constructor Details
-
DownloadExporter
public DownloadExporter()
-
-
Method Details
-
getFileName
gets the filename from the request or the session -
getFileName
-
toJson
- Specified by:
toJson
in interfaceClientSideExporter
- Overrides:
toJson
in classHTMLExporter
-
getClientSideRenderer
- Specified by:
getClientSideRenderer
in interfaceClientSideExporter
- Overrides:
getClientSideRenderer
in classHTMLExporter
-
getDataStream
- Specified by:
getDataStream
in interfaceFileReportingExporter
-
getDataObject
returns the Object which is generated by this Exporter called by abstract Class DownloadExpoerter- Parameters:
q
- the executed querytm
- the result tablemodel- Returns:
- the object representing - mostly a path to a temp file
-
download
Implement this method to provide download. Obtain a timestamp from request parameter time and retrieve the queryid and the data object of the getData methodHttpSession
Paramters "queryid"+timestamp and "querydata"+timestamp Note: Set the correct Contenttype and length of response.- Parameters:
req
- the download requestres
- the response object
-
getExportOptionsJSON
Description copied from interface:ReportingExporter
add configureable fields...- Specified by:
getExportOptionsJSON
in interfaceReportingExporter
- Overrides:
getExportOptionsJSON
in classHTMLExporter
- Returns:
- jsonarray which contains jsonobjects which have at leaast an id, a label and an implementing widget
-