Class BTDataCollectionTemplateStructureOutcomeRuleAlign
java.lang.Object
overit.geocall.bl.BusinessTask<DataCollectionTemplateStructureOutcomeRuleAlignEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<DataCollectionTemplateStructureOutcomeRuleAlignEvent>
overit.geocallapp.wfm.mobileforms.bl.task.BTDataCollection<DataCollectionTemplateStructureOutcomeRuleAlignEvent>
overit.geocallapp.wfm.mobileforms.bl.outcomerule.task.BTDataCollectionTemplateStructureOutcomeRuleAlign
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(DataCollectionTemplateStructureOutcomeRuleAlignEvent.class)
public class BTDataCollectionTemplateStructureOutcomeRuleAlign
extends BTDataCollection<DataCollectionTemplateStructureOutcomeRuleAlignEvent>
Business task in order to align a
When the
BODataCollectionTemplateStructureOutcomeRule. When the
DataCollectionTemplateStructureOutcomeRuleAlignEvent is launched the BT notices the call and aligns
the BODataCollectionTemplateStructureOutcomeRule basing on the event's input. Required fields:
- template structure
- outcome reason
Visibility:
- template structure that belong to the same current user's operation center
- outcome reasons 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 voiddeleteOutcomeRule(Long outcomeRuleId, PoolKit poolKit) Deletes a single outcome rule.protected voiddeleteOutcomeRules(Set<Long> outcomeRuleIds, PoolKit poolKit) Deletes the removed template outcome rules.protected voidexecute(DataCollectionTemplateStructureOutcomeRuleAlignEvent event, PoolKit poolKit) Deletes the removed template structure outcome rules, inserts the new associations, and updates the existing associations.protected voidinsertOutcomeRule(BODataCollectionTemplateStructureOutcomeRule outcomeRule, PoolKit poolKit) Inserts a single template structure outcome rule.protected voidinsertOutcomeRules(List<BODataCollectionTemplateStructureOutcomeRule> outcomeRulesToInsert, Long newTemplateStructure, PoolKit poolKit) Inserts new template structure outcome rules.protected voidupdateOutcomeRule(BODataCollectionTemplateStructureOutcomeRule outcomeRule, PoolKit poolKit) Updates a single template structure outcome rule.protected voidupdateOutcomeRules(List<BODataCollectionTemplateStructureOutcomeRule> outcomeRulesToUpdate, PoolKit poolKit) Updates existing template structure outcome rules.protected voidValidates the input for the align operation.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
-
BTDataCollectionTemplateStructureOutcomeRuleAlign
public BTDataCollectionTemplateStructureOutcomeRuleAlign()
-
-
Method Details
-
execute
protected void execute(DataCollectionTemplateStructureOutcomeRuleAlignEvent event, PoolKit poolKit) throws DAException, DAValidateException Deletes the removed template structure outcome rules, inserts the new associations, and updates the existing associations.- Specified by:
executein classValidExecutionBusinessTask<DataCollectionTemplateStructureOutcomeRuleAlignEvent>- Parameters:
event- theDataCollectionTemplateStructureOutcomeRuleAlignEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validateInput
protected void validateInput(DataCollectionTemplateStructureOutcomeRuleAlignInput input) throws DAValidateException Validates the input for the align operation. Ensures that newTemplateStructure is not null when there are rules to insert.- Parameters:
input- theDataCollectionTemplateStructureOutcomeRuleAlignInput- Throws:
DAValidateException- if newTemplateStructure is null and there are rules to insert
-
deleteOutcomeRules
protected void deleteOutcomeRules(Set<Long> outcomeRuleIds, PoolKit poolKit) throws DAException, DAValidateException Deletes the removed template outcome rules.- Parameters:
outcomeRuleIds- the set of outcome rule ids to deletepoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
deleteOutcomeRule
protected void deleteOutcomeRule(Long outcomeRuleId, PoolKit poolKit) throws DAException, DAValidateException Deletes a single outcome rule.- Parameters:
outcomeRuleId- the outcome rule idpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
insertOutcomeRules
protected void insertOutcomeRules(List<BODataCollectionTemplateStructureOutcomeRule> outcomeRulesToInsert, Long newTemplateStructure, PoolKit poolKit) throws DAException, DAValidateException Inserts new template structure outcome rules.- Parameters:
outcomeRulesToInsert- the list of outcome rules to insertnewTemplateStructure- the new template structure idpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
insertOutcomeRule
protected void insertOutcomeRule(BODataCollectionTemplateStructureOutcomeRule outcomeRule, PoolKit poolKit) throws DAException, DAValidateException Inserts a single template structure outcome rule.- Parameters:
outcomeRule- the outcome rule to insertpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
updateOutcomeRules
protected void updateOutcomeRules(List<BODataCollectionTemplateStructureOutcomeRule> outcomeRulesToUpdate, PoolKit poolKit) throws DAException, DAValidateException Updates existing template structure outcome rules.- Parameters:
outcomeRulesToUpdate- the list of outcome rules to updatepoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
updateOutcomeRule
protected void updateOutcomeRule(BODataCollectionTemplateStructureOutcomeRule outcomeRule, PoolKit poolKit) throws DAException, DAValidateException Updates a single template structure outcome rule.- Parameters:
outcomeRule- the outcome rule to updatepoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-