com.groiss.reporting.export
Class DownloadExporter

java.lang.Object
  extended by com.groiss.reporting.export.HTMLExporter
      extended by com.groiss.reporting.export.DownloadExporter
All Implemented Interfaces:
ReportingExporter, Public

public abstract class DownloadExporter
extends HTMLExporter
implements Public

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
DownloadExporter()
           
 
Method Summary
 void download(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Implement this Mehthod to provide download.
protected  java.lang.Object getData(Query q, ReportingTableModel tm)
          Overwrite this Method to generate downloadable Object.
protected  javax.swing.table.TableModel getResultTableModel(Query q, ReportingTableModel tm)
          Returns a tablemodel that the TableRenderer may handle.
 
Methods inherited from class com.groiss.reporting.export.HTMLExporter
addConfigOptions, export, getAttributeDropdownlist, getExportName, getHeaderInfos, getId, getLineStyles, getPage, getResultComponent, getTableAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DownloadExporter

public DownloadExporter()
Method Detail

getResultTableModel

protected javax.swing.table.TableModel getResultTableModel(Query q,
                                                           ReportingTableModel tm)
Description copied from class: HTMLExporter
Returns a tablemodel that the TableRenderer may handle. Overwrite this method if the exporter should display the results in html to ensure compatibility with toolbar actions

Overrides:
getResultTableModel in class HTMLExporter
Parameters:
q - The query object
tm - The Reporting results return a Tablemodel implementation that the TableRenderer is able to transform to a TableContainer.

getData

protected java.lang.Object getData(Query q,
                                   ReportingTableModel tm)
Overwrite this Method to generate downloadable Object.

Parameters:
q - the Query Object
tm - the Reporting result table model
Returns:
a Object represanting the Download file/objet

download

public void download(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
Implement this Mehthod to provide download. Obtain a timestamp from request paramteter time and retrieve the queryid and the dataobject of the getData mehtod HttpSession Paramters "queryid"+timestamp and "querydata"+timestamp Note: Set the correct Contenttype and length of response.

Parameters:
req - the download request
res - the resonse object


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.