mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
CE-881 - add field: isBinary
This commit is contained in:
@ -39,22 +39,23 @@ import org.dhatim.fastexcel.Worksheet;
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
public enum ReportFormat
|
public enum ReportFormat
|
||||||
{
|
{
|
||||||
XLSX(Worksheet.MAX_ROWS, Worksheet.MAX_COLS, ExcelPoiBasedStreamingExportStreamer::new, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xlsx"),
|
XLSX(Worksheet.MAX_ROWS, Worksheet.MAX_COLS, ExcelPoiBasedStreamingExportStreamer::new, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xlsx", true),
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// if we need to fall back to Fastexcel, this was its version of this. //
|
// if we need to fall back to Fastexcel, this was its version of this. //
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// XLSX(Worksheet.MAX_ROWS, Worksheet.MAX_COLS, ExcelFastexcelExportStreamer::new, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xlsx"),
|
// XLSX(Worksheet.MAX_ROWS, Worksheet.MAX_COLS, ExcelFastexcelExportStreamer::new, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xlsx"),
|
||||||
|
|
||||||
JSON(null, null, JsonExportStreamer::new, "application/json", "json"),
|
JSON(null, null, JsonExportStreamer::new, "application/json", "json", false),
|
||||||
CSV(null, null, CsvExportStreamer::new, "text/csv", "csv"),
|
CSV(null, null, CsvExportStreamer::new, "text/csv", "csv", false),
|
||||||
LIST_OF_MAPS(null, null, ListOfMapsExportStreamer::new, null, null);
|
LIST_OF_MAPS(null, null, ListOfMapsExportStreamer::new, null, null, false);
|
||||||
|
|
||||||
|
|
||||||
private final Integer maxRows;
|
private final Integer maxRows;
|
||||||
private final Integer maxCols;
|
private final Integer maxCols;
|
||||||
private final String mimeType;
|
private final String mimeType;
|
||||||
private final String extension;
|
private final String extension;
|
||||||
|
private final boolean isBinary;
|
||||||
|
|
||||||
private final Supplier<? extends ExportStreamerInterface> streamerConstructor;
|
private final Supplier<? extends ExportStreamerInterface> streamerConstructor;
|
||||||
|
|
||||||
@ -63,13 +64,14 @@ public enum ReportFormat
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
ReportFormat(Integer maxRows, Integer maxCols, Supplier<? extends ExportStreamerInterface> streamerConstructor, String mimeType, String extension)
|
ReportFormat(Integer maxRows, Integer maxCols, Supplier<? extends ExportStreamerInterface> streamerConstructor, String mimeType, String extension, boolean isBinary)
|
||||||
{
|
{
|
||||||
this.maxRows = maxRows;
|
this.maxRows = maxRows;
|
||||||
this.maxCols = maxCols;
|
this.maxCols = maxCols;
|
||||||
this.mimeType = mimeType;
|
this.mimeType = mimeType;
|
||||||
this.streamerConstructor = streamerConstructor;
|
this.streamerConstructor = streamerConstructor;
|
||||||
this.extension = extension;
|
this.extension = extension;
|
||||||
|
this.isBinary = isBinary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -147,4 +149,15 @@ public enum ReportFormat
|
|||||||
{
|
{
|
||||||
return extension;
|
return extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Getter for isBinary
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public boolean getIsBinary()
|
||||||
|
{
|
||||||
|
return isBinary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user