Class BTDataCollectionSheetInstanceExportXlsx
java.lang.Object
overit.geocall.bl.BusinessTask<DataCollectionSheetInstanceExportXlsxEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<DataCollectionSheetInstanceExportXlsxEvent>
overit.geocallapp.wfm.mobileforms.bl.task.BTDataCollection<DataCollectionSheetInstanceExportXlsxEvent>
overit.geocallapp.wfm.core.bl.datacollection.instance.task.BTDataCollectionSheetInstanceExportXlsx
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(DataCollectionSheetInstanceExportXlsxEvent.class)
public class BTDataCollectionSheetInstanceExportXlsx
extends BTDataCollection<DataCollectionSheetInstanceExportXlsxEvent>
Business task in order to export the xlsx of a
When the
DataCollectionSheetInstance. When the
DataCollectionSheetInstanceExportXlsxEvent is launched
the BT notices the call and exports the xlsx of the DataCollectionSheetInstance basing on the event's input. Errors:
Codes.C270_0909: Data to export not defined
- Since:
- 12.0
- See Also:
- GCApi:
- task
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected overit.geocallapp.wfm.util.wfmtasklog.WfmTaskLogprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendSheetsRecap(List<BODataCollectionSheet> sheets, XlsxDocument excelDocument, PoolKit poolKit) Appends the sheets recap.protected voidappendTemplateStructureSheetsModel(List<BODataCollectionSheet> sheets, XlsxDocument excelDocument, Teacher teacher) Appends the template structure sheets model.protected voidcompleteAccountDBViewData(DBView dbv, PoolKit poolKit) Completes the account DB view data.protected voidcompleteAssetDBViewData(DBView dbv, PoolKit poolKit) Completes the asset DB view data.protected voidcompleteDBViewData(DBView dbv, PoolKit poolKit) Completes the DB view data.protected voidexecute(DataCollectionSheetInstanceExportXlsxEvent event, PoolKit poolKit) Exports the xlsx associated to the data collection sheet instance.Returns the account cache.Returns the additional columns.protected WebResourceReturns the report web resource.protected List<TreeModel<DataCollectionNode>> Returns the tree model nodes.protected List<BODataCollectionSheet> loadSheets(Map<String, Object> filters, PoolKit poolkit) Loads the sheets.protected voidLogs the error.Methods inherited from class overit.geocallapp.wfm.mobileforms.bl.task.BTDataCollection
getException, isValidExecution, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, checkValidExecution, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
XLSX_DOCUMENT_FILE_NAME
- See Also:
-
MODEL_XLSX_SHEET_FILE_NAME
- See Also:
-
RECAP_XLSX_SHEET_NAME
- See Also:
-
MODEL_XLSX_TABLE_VIEW_NAME
- See Also:
-
GENERIC_COLUMN_TAG
- See Also:
-
SHEET_ID_COLUMN_NAME
- See Also:
-
SHEET_ID_COLUMN_LABEL
- See Also:
-
logger
protected overit.geocallapp.wfm.util.wfmtasklog.WfmTaskLog logger
-
-
Constructor Details
-
BTDataCollectionSheetInstanceExportXlsx
public BTDataCollectionSheetInstanceExportXlsx()
-
-
Method Details
-
execute
protected void execute(DataCollectionSheetInstanceExportXlsxEvent event, PoolKit poolKit) throws DAException, DAValidateException Exports the xlsx associated to the data collection sheet instance.- Specified by:
executein classValidExecutionBusinessTask<DataCollectionSheetInstanceExportXlsxEvent>- Parameters:
event- theDataCollectionSheetInstanceExportXlsxEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadSheets
protected List<BODataCollectionSheet> loadSheets(Map<String, Object> filters, PoolKit poolkit) throws DAValidateException, DAExceptionLoads the sheets.- Parameters:
filters- the filterspoolkit- thePoolKit- Returns:
- a list of BO data collection sheet elements of type BODataCollectionSheet
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception- See Also:
-
appendSheetsRecap
protected void appendSheetsRecap(List<BODataCollectionSheet> sheets, XlsxDocument excelDocument, PoolKit poolKit) throws DAException, DAValidateException Appends the sheets recap.- Parameters:
sheets- list ofBODataCollectionSheetelementsexcelDocument- theXlsxDocument- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
appendTemplateStructureSheetsModel
protected void appendTemplateStructureSheetsModel(List<BODataCollectionSheet> sheets, XlsxDocument excelDocument, Teacher teacher) throws DAException, DAValidateException Appends the template structure sheets model.- Parameters:
sheets- list ofBODataCollectionSheetelementsexcelDocument- theXlsxDocumentteacher- the teacher- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
logError
Logs the error.- Parameters:
message- the messageparameters- the parameters
-
getTreeModelNodes
Returns the tree model nodes.- Parameters:
sheet- theBODataCollectionSheet- Returns:
- a list of tree model elements of type TreeModel
- See Also:
-
getReportWebResource
Returns the report web resource.- Returns:
- the report web resource
-
completeDBViewData
protected void completeDBViewData(DBView dbv, PoolKit poolKit) throws DAException, DAValidateException Completes the DB view data.- Parameters:
dbv- the DB view- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
completeAssetDBViewData
protected void completeAssetDBViewData(DBView dbv, PoolKit poolKit) throws DAException, DAValidateException Completes the asset DB view data.- Parameters:
dbv- the DB viewpoolKit- the pool kit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
completeAccountDBViewData
protected void completeAccountDBViewData(DBView dbv, PoolKit poolKit) throws DAException, DAValidateException Completes the account DB view data.- Parameters:
dbv- the DB viewpoolKit- the pool kit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
getAdditionalColumns
Returns the additional columns.- Returns:
- the additional columns
-
getAccountCache
Returns the account cache.- Returns:
- the account cache
-
getAssetCache
-