Class BTDataCollectionTemplateApplyWOCreationRule
java.lang.Object
overit.geocall.bl.BusinessTask<DataCollectionTemplateApplyWOCreationRuleEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<DataCollectionTemplateApplyWOCreationRuleEvent>
overit.geocallapp.wfm.mobileforms.bl.task.BTDataCollection<DataCollectionTemplateApplyWOCreationRuleEvent>
overit.geocallapp.wfm.core.bl.datacollection.template.task.BTDataCollectionTemplateApplyWOCreationRule
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(DataCollectionTemplateApplyWOCreationRuleEvent.class)
public class BTDataCollectionTemplateApplyWOCreationRule
extends BTDataCollection<DataCollectionTemplateApplyWOCreationRuleEvent>
Business task in order to apply a
When the
BODataCollectionTemplateWOCreationRule. When the
DataCollectionTemplateApplyWOCreationRuleEvent is launched
the BT notices the call and applies the rule to the BODataCollectionTemplateWOCreationRule basing on the event's input. Visibility:
- templates that belong to the same current user's operation center
- releases that belong to the same current user's operation center
- working copies that belong to the same current user's operation center
- work cycles that belong to the same current user's operation center
- sheets that belong to the same current user's operation center
- Since:
- 12.0
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassociateSheetToWOOperation(BOWorkOrderOperation woOperation, Long sheetId, PoolKit poolKit) Associates the sheet to the WO operation.protected BODataCollectionSheetcreateSheet(Long operationCenter, BODataCollectionTemplateWOCreationRule rule, DataCollectionTemplateRelease template) Creates a new sheet.protected voidexecute(DataCollectionTemplateApplyWOCreationRuleEvent event, PoolKit poolKit) Execute.protected LonginsertSheet(DataCollectionTemplateRelease template, BODataCollectionSheet sheet, PoolKit poolKit) Inserts the sheet.protected List<BODataCollectionTemplateWOCreationRule> loadRules(PoolKit poolKit, BOWorkOrderOperation woOperation) Loads the rules.protected WorkOrderloadWorkOrder(Long woId, PoolKit poolKit) Loads the work order.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
-
Constructor Details
-
BTDataCollectionTemplateApplyWOCreationRule
public BTDataCollectionTemplateApplyWOCreationRule()
-
-
Method Details
-
execute
protected void execute(DataCollectionTemplateApplyWOCreationRuleEvent event, PoolKit poolKit) throws DAException, DAValidateException Execute.- Specified by:
executein classValidExecutionBusinessTask<DataCollectionTemplateApplyWOCreationRuleEvent>- Parameters:
event- theDataCollectionTemplateApplyWOCreationRuleEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadWorkOrder
protected WorkOrder loadWorkOrder(Long woId, PoolKit poolKit) throws DAValidateException, DAException Loads the work order.- Parameters:
woId- the wo idpoolKit- thePoolKit- Returns:
- the work order
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadRules
protected List<BODataCollectionTemplateWOCreationRule> loadRules(PoolKit poolKit, BOWorkOrderOperation woOperation) throws DAValidateException, DAException Loads the rules.- Parameters:
poolKit- thePoolKitwoOperation- the wo operation- Returns:
- a list of BO data collection template WO creation rule elements of type BODataCollectionTemplateWOCreationRule
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception- See Also:
-
createSheet
protected BODataCollectionSheet createSheet(Long operationCenter, BODataCollectionTemplateWOCreationRule rule, DataCollectionTemplateRelease template) Creates a new sheet.- Parameters:
operationCenter- theBOOperationCenterrule- theBODataCollectionTemplateWOCreationRuletemplate- theDataCollectionTemplate- Returns:
- the BO data collection sheet
-
insertSheet
protected Long insertSheet(DataCollectionTemplateRelease template, BODataCollectionSheet sheet, PoolKit poolKit) throws DAValidateException, DAException Inserts the sheet.- Parameters:
template- theDataCollectionTemplatesheet- theBODataCollectionSheetpoolKit- thePoolKit- Returns:
- the long
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
associateSheetToWOOperation
protected void associateSheetToWOOperation(BOWorkOrderOperation woOperation, Long sheetId, PoolKit poolKit) throws DAValidateException, DAException Associates the sheet to the WO operation.- Parameters:
woOperation- the wo operationsheetId- theBODataCollectionSheetpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-