|
SPT RWT Application API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.rwt.webui.ExcelDownloadProvider
public class ExcelDownloadProvider
Action listener for exporting the results of a SQL statement to Excel. This uses the Apache POI HSSF library for creating Excel workbooks.
© Copyright 2007 Sans Pareil Technologies, Inc.
| Field Summary | |
|---|---|
private ConnectionManager |
manager
The connection manager to use to fetch database connection. |
private String |
query
The SQL statement to be executed to fetch the data to be exported. |
| Constructor Summary | |
|---|---|
ExcelDownloadProvider(String query,
ConnectionManager manager)
Create a new instance of the download provider using the specified values. |
|
| Method Summary | |
|---|---|
String |
getContentDisposition()
Return the content-disposition for the excel workbook. |
String |
getContentType()
Return the content-type for the excel workbook. |
String |
getFileName()
Return the file name for the workbook. |
int |
getSize()
Returns the size in bytes of the workbook. |
void |
writeFile(OutputStream out)
The DownloadProvider implementation method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final String query
private final ConnectionManager manager
| Constructor Detail |
|---|
public ExcelDownloadProvider(String query,
ConnectionManager manager)
query - The query to execute.manager - The manager to use to fetch connection.| Method Detail |
|---|
public String getContentType()
content-type for the excel workbook.
getContentType in interface nextapp.echo2.app.filetransfer.DownloadProviderpublic String getContentDisposition()
content-disposition for the excel workbook.
getContentDisposition in interface nextapp.echo2.app.filetransfer.DownloadProviderattachment to
avoid some issues with full content not being pushed to client
in inline mode.public String getFileName()
getFileName in interface nextapp.echo2.app.filetransfer.DownloadProviderQueryResults.xls.public int getSize()
getSize in interface nextapp.echo2.app.filetransfer.DownloadProvider-1 to indicate that the size is unknown.
public void writeFile(OutputStream out)
throws IOException
DownloadProvider implementation method. Generates
the excel workbook and streams to the client.
writeFile in interface nextapp.echo2.app.filetransfer.DownloadProviderout - The OutputStream to which the contents of
the Excel workbook is to be written.
IOException - If errors are encountered while writing the
contents.
|
SPT RWT Application API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||