com.groiss.reporting.export
Class HTMLExporter

java.lang.Object
  extended by com.groiss.reporting.export.HTMLExporter
All Implemented Interfaces:
ReportingExporter
Direct Known Subclasses:
DownloadExporter

public class HTMLExporter
extends java.lang.Object
implements ReportingExporter

Exports Query results to HTML. Uses TableRenderer to display result Table.


Field Summary
 
Fields inherited from interface com.groiss.reporting.export.ReportingExporter
ROW_STYLE_HIDDEN
 
Constructor Summary
HTMLExporter()
           
 
Method Summary
 void addConfigOptions(Query q, XHTMLPage p)
          Method is called for all configured exporter.
 void export(javax.servlet.http.HttpServletResponse res, Query q, ReportingTableModel tm)
          exports the table model
static SelectList getAttributeDropdownlist(Query q, boolean addEmptyOption)
          Returns SelectList containing the available Attributes and their ids.
 java.lang.String getExportName()
          
protected  java.util.Map<java.lang.String,java.lang.String> getHeaderInfos(Query q, int count)
           
protected  java.lang.String getId()
           
 KeyedList<java.lang.Integer,java.lang.String> getLineStyles(Query q, ReportingTableModel tm)
           
 HTMLPage getPage(Query q)
          Returns the configured HTML Page...
protected  Component getResultComponent(Query q, ReportingTableModel tm, java.lang.String tbactions)
           
protected  javax.swing.table.TableModel getResultTableModel(Query q, ReportingTableModel tm)
          Returns a tablemodel that the TableRenderer may handle.
protected  com.groiss.reporting.gui.ReportingTableAdapter getTableAdapter(javax.swing.table.TableModel tm, Query q, java.lang.String defaultActions)
          Override this method to change Toolbar actions or other TableAdapter settings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLExporter

public HTMLExporter()
Method Detail

getId

protected java.lang.String getId()

addConfigOptions

public void addConfigOptions(Query q,
                             XHTMLPage p)
Method is called for all configured exporter. Add fields to XHMTLPage to enable configuration settings. Id of field will be the key of the Exportparameter.

Specified by:
addConfigOptions in interface ReportingExporter
Parameters:
q - the query Object
p - the XHTMLPage for ExportOptions

getPage

public HTMLPage getPage(Query q)
Returns the configured HTML Page...

Parameters:
q - the specified query
Returns:
the page containing wildcards for additional scripts and the data.

getExportName

public java.lang.String getExportName()

Specified by:
getExportName in interface ReportingExporter
Returns:
the I18N name of the exporter

export

public void export(javax.servlet.http.HttpServletResponse res,
                   Query q,
                   ReportingTableModel tm)
exports the table model

Specified by:
export in interface ReportingExporter
Parameters:
res - the Response of the report request
q - the executed Query
tm - The result Tablemodel

getResultComponent

protected Component getResultComponent(Query q,
                                       ReportingTableModel tm,
                                       java.lang.String tbactions)
Parameters:
q - The Query Object
tm - the TableModel
tbactions -
Returns:

getTableAdapter

protected com.groiss.reporting.gui.ReportingTableAdapter getTableAdapter(javax.swing.table.TableModel tm,
                                                                         Query q,
                                                                         java.lang.String defaultActions)
Override this method to change Toolbar actions or other TableAdapter settings

Parameters:
tm - the TableModel
q - the executed query object
defaultActions - keys of the default toolbar actions return the ReportingTableAdapter

getResultTableModel

protected javax.swing.table.TableModel getResultTableModel(Query q,
                                                           ReportingTableModel tm)
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

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

getHeaderInfos

protected java.util.Map<java.lang.String,java.lang.String> getHeaderInfos(Query q,
                                                                          int count)
Parameters:
q - the Query objects
count - the number of results of report
Returns:
a Map with the Info params. The key is the I18N key of the info paramters, the value the configured value

getAttributeDropdownlist

public static SelectList getAttributeDropdownlist(Query q,
                                                  boolean addEmptyOption)
Returns SelectList containing the available Attributes and their ids. Needed for options pages

Parameters:
q - the query Object
addEmptyOption - - pas true if selectlist shall include an empty option
Returns:
the filled select list, no name or id is set

getLineStyles

public KeyedList<java.lang.Integer,java.lang.String> getLineStyles(Query q,
                                                                   ReportingTableModel tm)


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