it.eng.spagobi.engines.worksheet.services.export
Class ExportWorksheetAction
java.lang.Object
it.eng.spago.dispatching.service.DefaultRequestContext
it.eng.spago.dispatching.service.DefaultHttpRequestContext
it.eng.spago.dispatching.action.AbstractHttpAction
it.eng.spagobi.utilities.service.AbstractBaseHttpAction
it.eng.spagobi.utilities.engines.AbstractEngineAction
it.eng.spagobi.engines.worksheet.services.AbstractWorksheetEngineAction
it.eng.spagobi.engines.worksheet.services.runtime.ExecuteWorksheetQueryAction
it.eng.spagobi.engines.worksheet.services.export.ExportWorksheetAction
- All Implemented Interfaces:
- it.eng.spago.dispatching.action.ActionIFace, it.eng.spago.dispatching.service.HttpRequestContextIFace, it.eng.spago.dispatching.service.RequestContextIFace, it.eng.spago.dispatching.service.ServiceIFace, it.eng.spago.init.InitializerIFace, java.io.Serializable
public class ExportWorksheetAction
- extends ExecuteWorksheetQueryAction
- See Also:
- Serialized Form
Fields inherited from class it.eng.spagobi.utilities.engines.AbstractEngineAction |
PRIVATE_SCOPE, PUBLIC_SCOPE |
Method Summary |
protected java.lang.String |
buildSqlStatement(CrosstabDefinition crosstabDefinition,
it.eng.spagobi.tools.dataset.persist.IDataSetTableDescriptor descriptor,
java.util.List<it.eng.qbe.query.WhereField> filters,
it.eng.spagobi.tools.datasource.bo.IDataSource dataSource)
Build the sql statement to query the temporary table |
void |
exportSheetToXLS(org.apache.poi.hssf.usermodel.HSSFWorkbook wb,
org.json.JSONObject sheetJ,
WorkSheetXLSExporter exporter,
org.apache.poi.ss.usermodel.CreationHelper createHelper,
it.eng.qbe.query.WhereField splittingWhereField)
|
void |
exportSheetToXLSX(org.apache.poi.xssf.usermodel.XSSFWorkbook wb,
org.json.JSONObject sheetJ,
WorkSheetXLSXExporter exporter,
org.apache.poi.ss.usermodel.CreationHelper createHelper,
it.eng.qbe.query.WhereField splittingWhereField)
|
void |
exportToPDF(org.json.JSONObject worksheetJSON,
java.io.OutputStream outputStream)
|
void |
exportToXLS(org.json.JSONObject worksheetJSON,
java.io.OutputStream stream)
|
void |
exportToXLSX(org.json.JSONObject worksheetJSON,
java.io.OutputStream stream)
|
int |
fillSheetContent(org.apache.poi.hssf.usermodel.HSSFWorkbook wb,
org.apache.poi.hssf.usermodel.HSSFSheet sheet,
org.json.JSONObject sheetJ,
it.eng.qbe.query.WhereField splittingWhereField,
org.apache.poi.ss.usermodel.CreationHelper createHelper,
WorkSheetXLSExporter exporter,
org.apache.poi.hssf.usermodel.HSSFPatriarch patriarch,
int sheetRow)
|
int |
fillSheetContent(org.apache.poi.xssf.usermodel.XSSFWorkbook wb,
org.apache.poi.xssf.usermodel.XSSFSheet sheet,
org.json.JSONObject sheetJ,
it.eng.qbe.query.WhereField splittingWhereField,
org.apache.poi.ss.usermodel.CreationHelper createHelper,
WorkSheetXLSXExporter exporter,
org.apache.poi.xssf.usermodel.XSSFDrawing patriarch,
int sheetRow)
|
CrossTab |
getCrosstab(org.json.JSONObject crosstabDefinitionJSON,
org.json.JSONObject optionalFilters,
java.lang.String sheetName,
it.eng.qbe.query.WhereField splittingWhereField,
org.json.JSONArray calculateFieldsJSON)
|
java.util.List<it.eng.qbe.query.WhereField> |
getSplittingFieldValues(org.json.JSONObject optionalFilters,
java.lang.String sheetName)
|
boolean |
isTableContent(org.json.JSONObject sheetJSON)
Return true if the content of a sheet is a table |
void |
service(it.eng.spago.base.SourceBean request,
it.eng.spago.base.SourceBean response)
|
Methods inherited from class it.eng.spagobi.engines.worksheet.services.AbstractWorksheetEngineAction |
adjustMetadata, buildSqlStatement, executeWorksheetQuery, getAllFields, getConnection, getDataSource, getEngineInstance, getFiltersOnDomainValues, getGlobalFiltersOnDomainValues, getOptionalFilters, getSheetFiltersOnDomainValues, getTemporaryTableName, getUserSheetFilterValues, persistDataSet, setDataSource, setEngineInstance, transformIntoWhereClauses, transformIntoWhereClauses, updateWorksheetDefinition |
Methods inherited from class it.eng.spagobi.utilities.engines.AbstractEngineAction |
getAuditServiceProxy, getConetxtManager, getEnv, getLocale, getSpagoBIHttpSessionContainer, getSpagoBISessionContainer, init, saveAnalysisState, setLocale |
Methods inherited from class it.eng.spagobi.utilities.service.AbstractBaseHttpAction |
delAttributeFromHttpSession, delAttributeFromSession, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsCsvStringList, getAttributeAsInteger, getAttributeAsJSONArray, getAttributeAsJSONObject, getAttributeAsList, getAttributeAsString, getAttributeFromHttpSession, getAttributeFromHttpSessionAsBoolean, getAttributeFromHttpSessionAsBoolean, getAttributeFromHttpSessionAsString, getAttributeFromSession, getAttributeFromSessionAsBoolean, getAttributeFromSessionAsBoolean, getAttributeFromSessionAsString, getAttributesAsLinkedMap, getAttributesAsMap, getHttpSession, getSessionContainer, getSpagoBIRequestContainer, getSpagoBIResponseContainer, httpSessionContainsAttribute, requestContainsAttribute, requestContainsAttribute, sessionContainsAttribute, setAttribute, setAttributeInHttpSession, setAttributeInSession, setSpagoBIRequestContainer, setSpagoBIResponseContainer, tryToWriteBackToClient, writeBackToClient, writeBackToClient, writeBackToClient, writeBackToClient, writeBackToClient |
Methods inherited from class it.eng.spago.dispatching.action.AbstractHttpAction |
getActionMethod, getActionName, getConfig, setActionMethod, setActionName |
Methods inherited from class it.eng.spago.dispatching.service.DefaultHttpRequestContext |
freezeHttpResponse, getHttpRequest, getHttpResponse, getServletConfig, isHttpResponseFreezed, setRequestContext, unfreezeHttpResponse |
Methods inherited from class it.eng.spago.dispatching.service.DefaultRequestContext |
getErrorHandler, getRequestContainer, getResponseContainer, getServiceRequest, getServiceResponse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface it.eng.spago.dispatching.service.RequestContextIFace |
getErrorHandler, getRequestContainer, getResponseContainer, getServiceRequest, getServiceResponse |
MIME_TYPE
public static final java.lang.String MIME_TYPE
- See Also:
- Constant Field Values
RESPONSE_TYPE
public static final java.lang.String RESPONSE_TYPE
- See Also:
- Constant Field Values
WORKSHEETS
public static final java.lang.String WORKSHEETS
- See Also:
- Constant Field Values
SHEETS_NUM
public static final java.lang.String SHEETS_NUM
- See Also:
- Constant Field Values
EXPORTED_SHEETS
public static final java.lang.String EXPORTED_SHEETS
- See Also:
- Constant Field Values
CONTENT
public static final java.lang.String CONTENT
- See Also:
- Constant Field Values
CONTENT_PARS
public static final java.lang.String CONTENT_PARS
- See Also:
- Constant Field Values
SPLITTING_FILTER
public static final java.lang.String SPLITTING_FILTER
- See Also:
- Constant Field Values
RESPONSE_TYPE_INLINE
public static final java.lang.String RESPONSE_TYPE_INLINE
- See Also:
- Constant Field Values
RESPONSE_TYPE_ATTACHMENT
public static final java.lang.String RESPONSE_TYPE_ATTACHMENT
- See Also:
- Constant Field Values
SVG
public static java.lang.String SVG
OUTPUT_FORMAT
public static java.lang.String OUTPUT_FORMAT
OUTPUT_FORMAT_PNG
public static java.lang.String OUTPUT_FORMAT_PNG
OUTPUT_FORMAT_JPEG
public static java.lang.String OUTPUT_FORMAT_JPEG
OUTPUT_FORMAT_PDF
public static java.lang.String OUTPUT_FORMAT_PDF
OUTPUT_FORMAT_SVG
public static java.lang.String OUTPUT_FORMAT_SVG
logger
public static transient org.apache.log4j.Logger logger
- Logger component.
ExportWorksheetAction
public ExportWorksheetAction()
service
public void service(it.eng.spago.base.SourceBean request,
it.eng.spago.base.SourceBean response)
- Specified by:
service
in interface it.eng.spago.dispatching.service.ServiceIFace
- Overrides:
service
in class ExecuteWorksheetQueryAction
exportToPDF
public void exportToPDF(org.json.JSONObject worksheetJSON,
java.io.OutputStream outputStream)
throws java.lang.Exception
- Throws:
java.lang.Exception
exportToXLS
public void exportToXLS(org.json.JSONObject worksheetJSON,
java.io.OutputStream stream)
throws java.lang.Exception
- Throws:
java.lang.Exception
exportSheetToXLS
public void exportSheetToXLS(org.apache.poi.hssf.usermodel.HSSFWorkbook wb,
org.json.JSONObject sheetJ,
WorkSheetXLSExporter exporter,
org.apache.poi.ss.usermodel.CreationHelper createHelper,
it.eng.qbe.query.WhereField splittingWhereField)
throws java.lang.Exception
- Throws:
java.lang.Exception
fillSheetContent
public int fillSheetContent(org.apache.poi.hssf.usermodel.HSSFWorkbook wb,
org.apache.poi.hssf.usermodel.HSSFSheet sheet,
org.json.JSONObject sheetJ,
it.eng.qbe.query.WhereField splittingWhereField,
org.apache.poi.ss.usermodel.CreationHelper createHelper,
WorkSheetXLSExporter exporter,
org.apache.poi.hssf.usermodel.HSSFPatriarch patriarch,
int sheetRow)
throws java.lang.Exception
- Throws:
java.lang.Exception
exportToXLSX
public void exportToXLSX(org.json.JSONObject worksheetJSON,
java.io.OutputStream stream)
throws java.lang.Exception
- Throws:
java.lang.Exception
exportSheetToXLSX
public void exportSheetToXLSX(org.apache.poi.xssf.usermodel.XSSFWorkbook wb,
org.json.JSONObject sheetJ,
WorkSheetXLSXExporter exporter,
org.apache.poi.ss.usermodel.CreationHelper createHelper,
it.eng.qbe.query.WhereField splittingWhereField)
throws java.lang.Exception
- Throws:
java.lang.Exception
fillSheetContent
public int fillSheetContent(org.apache.poi.xssf.usermodel.XSSFWorkbook wb,
org.apache.poi.xssf.usermodel.XSSFSheet sheet,
org.json.JSONObject sheetJ,
it.eng.qbe.query.WhereField splittingWhereField,
org.apache.poi.ss.usermodel.CreationHelper createHelper,
WorkSheetXLSXExporter exporter,
org.apache.poi.xssf.usermodel.XSSFDrawing patriarch,
int sheetRow)
throws java.lang.Exception
- Throws:
java.lang.Exception
isTableContent
public boolean isTableContent(org.json.JSONObject sheetJSON)
- Return true if the content of a sheet is a table
- Parameters:
sheetJSON
- a sheet
- Returns:
- true if the content of a sheet is a table
getCrosstab
public CrossTab getCrosstab(org.json.JSONObject crosstabDefinitionJSON,
org.json.JSONObject optionalFilters,
java.lang.String sheetName,
it.eng.qbe.query.WhereField splittingWhereField,
org.json.JSONArray calculateFieldsJSON)
throws java.lang.Exception
- Throws:
java.lang.Exception
buildSqlStatement
protected java.lang.String buildSqlStatement(CrosstabDefinition crosstabDefinition,
it.eng.spagobi.tools.dataset.persist.IDataSetTableDescriptor descriptor,
java.util.List<it.eng.qbe.query.WhereField> filters,
it.eng.spagobi.tools.datasource.bo.IDataSource dataSource)
- Build the sql statement to query the temporary table
- Parameters:
crosstabDefinition
- definition of the crosstabdescriptor
- the temporary table descriptordataSource
- the datasourcetableName
- the temporary table name
- Returns:
- the sql statement to query the temporary table
getSplittingFieldValues
public java.util.List<it.eng.qbe.query.WhereField> getSplittingFieldValues(org.json.JSONObject optionalFilters,
java.lang.String sheetName)
throws org.json.JSONException
- Throws:
org.json.JSONException