it.eng.spagobi.engines.worksheet.services.export
Class ExportWorksheetAction

java.lang.Object
  extended by it.eng.spago.dispatching.service.DefaultRequestContext
      extended by it.eng.spago.dispatching.service.DefaultHttpRequestContext
          extended by it.eng.spago.dispatching.action.AbstractHttpAction
              extended by it.eng.spagobi.utilities.service.AbstractBaseHttpAction
                  extended by it.eng.spagobi.utilities.engines.AbstractEngineAction
                      extended by it.eng.spagobi.engines.worksheet.services.AbstractWorksheetEngineAction
                          extended by it.eng.spagobi.engines.worksheet.services.runtime.ExecuteWorksheetQueryAction
                              extended by 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

Field Summary
static java.lang.String CONTENT
           
static java.lang.String CONTENT_PARS
           
static java.lang.String EXPORTED_SHEETS
           
static java.lang.String FILTERS
           
static org.apache.log4j.Logger logger
          Logger component.
static java.lang.String MIME_TYPE
           
static java.lang.String OUTPUT_FORMAT
           
static java.lang.String OUTPUT_FORMAT_JPEG
           
static java.lang.String OUTPUT_FORMAT_PDF
           
static java.lang.String OUTPUT_FORMAT_PNG
           
static java.lang.String OUTPUT_FORMAT_SVG
           
static java.lang.String RESPONSE_TYPE
           
static java.lang.String RESPONSE_TYPE_ATTACHMENT
           
static java.lang.String RESPONSE_TYPE_INLINE
           
static java.lang.String SHEET
           
static java.lang.String SHEETS_NUM
           
static java.lang.String SVG
           
static java.lang.String WORKSHEETS
           
 
Fields inherited from class it.eng.spagobi.engines.worksheet.services.runtime.ExecuteWorksheetQueryAction
LIMIT, OPTIONAL_FILTERS, OPTIONAL_VISIBLE_COLUMNS, START
 
Fields inherited from class it.eng.spagobi.engines.worksheet.services.AbstractWorksheetEngineAction
auditlogger
 
Fields inherited from class it.eng.spagobi.utilities.engines.AbstractEngineAction
PRIVATE_SCOPE, PUBLIC_SCOPE
 
Constructor Summary
ExportWorksheetAction()
           
 
Method Summary
 void exportToPDF(org.json.JSONObject worksheetJSON, java.io.OutputStream outputStream)
           
 void exportToXLS(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, org.apache.poi.ss.usermodel.CreationHelper createHelper, WorkSheetXLSExporter exporter, org.apache.poi.hssf.usermodel.HSSFPatriarch patriarch, int sheetRow)
           
 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.runtime.ExecuteWorksheetQueryAction
executeQuery, executeQuery, serializeDataStore
 
Methods inherited from class it.eng.spagobi.engines.worksheet.services.AbstractWorksheetEngineAction
adjustMetadata, executeWorksheetQuery, getAllFields, getConnection, getDataSource, getEngineInstance, getFiltersOnDomainValues, getGlobalFiltersOnDomainValues, getOptionalFilters, getSheetFiltersOnDomainValues, getTemporaryTableName, persistDataSet, setDataSource, setEngineInstance, 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, 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
 

Field Detail

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

FILTERS

public static final java.lang.String FILTERS
See Also:
Constant Field Values

SHEET

public static final java.lang.String SHEET
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.

Constructor Detail

ExportWorksheetAction

public ExportWorksheetAction()
Method Detail

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

fillSheetContent

public int fillSheetContent(org.apache.poi.hssf.usermodel.HSSFWorkbook wb,
                            org.apache.poi.hssf.usermodel.HSSFSheet sheet,
                            org.json.JSONObject sheetJ,
                            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

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