|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.dandelion.datatables.core.export.ExportUtils
public final class ExportUtils
Utilities used when exporting data.
| Field Summary | |
|---|---|
static String |
DDL_DT_REQUESTATTR_EXPORT_CONF
Request attributes |
static String |
DDL_DT_REQUESTATTR_EXPORT_CONTENT
|
static String |
DDL_DT_REQUESTPARAM_EXPORT_AUTOSIZE
|
static String |
DDL_DT_REQUESTPARAM_EXPORT_EXTENSION
|
static String |
DDL_DT_REQUESTPARAM_EXPORT_FORMAT
|
static String |
DDL_DT_REQUESTPARAM_EXPORT_HEADER
|
static String |
DDL_DT_REQUESTPARAM_EXPORT_ID
|
static String |
DDL_DT_REQUESTPARAM_EXPORT_IN_PROGRESS
Request parameters |
static String |
DDL_DT_REQUESTPARAM_EXPORT_MIME_TYPE
|
static String |
DDL_DT_REQUESTPARAM_EXPORT_NAME
|
static String |
DDL_DT_REQUESTPARAM_EXPORT_ORIENTATION
|
static String |
DDL_DT_REQUESTPARAM_EXPORT_TYPE
|
| Method Summary | |
|---|---|
static String |
getCurrentExportType(javax.servlet.http.HttpServletRequest request)
|
static Boolean |
isTableBeingExported(javax.servlet.ServletRequest servletRequest,
HtmlTable table)
Check whether the table if being exported using the request ExportConstants#DDL_DT_REQUESTPARAM_EXPORT_ID attribute. |
static void |
renderExport(HtmlTable table,
ExportConf exportConf,
javax.servlet.http.HttpServletResponse response)
Renders the passed table by writing the data to the response. |
static void |
writeToResponse(javax.servlet.http.HttpServletResponse response,
ByteArrayOutputStream baos,
String title,
String contentType)
Write the given temporary OutputStream to the HTTP response as an Attachment with the given title. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DDL_DT_REQUESTATTR_EXPORT_CONF
public static final String DDL_DT_REQUESTATTR_EXPORT_CONTENT
public static final String DDL_DT_REQUESTPARAM_EXPORT_IN_PROGRESS
public static final String DDL_DT_REQUESTPARAM_EXPORT_TYPE
public static final String DDL_DT_REQUESTPARAM_EXPORT_ID
public static final String DDL_DT_REQUESTPARAM_EXPORT_FORMAT
public static final String DDL_DT_REQUESTPARAM_EXPORT_ORIENTATION
public static final String DDL_DT_REQUESTPARAM_EXPORT_HEADER
public static final String DDL_DT_REQUESTPARAM_EXPORT_MIME_TYPE
public static final String DDL_DT_REQUESTPARAM_EXPORT_EXTENSION
public static final String DDL_DT_REQUESTPARAM_EXPORT_NAME
public static final String DDL_DT_REQUESTPARAM_EXPORT_AUTOSIZE
| Method Detail |
|---|
public static void renderExport(HtmlTable table,
ExportConf exportConf,
javax.servlet.http.HttpServletResponse response)
table - The table to export.exportConf - The export configuration (e.g. the export class to use).response - The response to update.
public static void writeToResponse(javax.servlet.http.HttpServletResponse response,
ByteArrayOutputStream baos,
String title,
String contentType)
throws IOException
response - current HTTP responsebaos - the temporary OutputStream to writetitle - the title of the attachmentcontentType - the MIME type
IOException - if writing/flushing failedpublic static String getCurrentExportType(javax.servlet.http.HttpServletRequest request)
public static Boolean isTableBeingExported(javax.servlet.ServletRequest servletRequest,
HtmlTable table)
Check whether the table if being exported using the request
ExportConstants#DDL_DT_REQUESTPARAM_EXPORT_ID attribute.
The table's id must be tested in case of multiple tables are displayed on the same page and exportable.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||