Class BTDataCollectionTemplateWOCreationRuleUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<DataCollectionTemplateWOCreationRuleUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<DataCollectionTemplateWOCreationRuleUpdateEvent>
overit.geocallapp.wfm.mobileforms.bl.task.BTDataCollection<DataCollectionTemplateWOCreationRuleUpdateEvent>
overit.geocallapp.wfm.mobileforms.bl.rule.task.BTDataCollectionTemplateWOCreationRuleUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(DataCollectionTemplateWOCreationRuleUpdateEvent.class)
public class BTDataCollectionTemplateWOCreationRuleUpdate
extends BTDataCollection<DataCollectionTemplateWOCreationRuleUpdateEvent>
Business task in order to update a
BODataCollectionTemplateWOCreationRule.
When the DataCollectionTemplateWOCreationRuleUpdateEvent is launched
the BT notices the call and updates the BODataCollectionTemplateWOCreationRule basing on the event's input.
Required fields:
- data collection template wo creation rule id
Permission:
Visibility:
- templates that belong to the same current user's operation center
- work cycle operations 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 voidcheckExistTemplate(Long template, PoolKit poolKit) Checks if the specified data collection template exists in the database.protected voidexecute(DataCollectionTemplateWOCreationRuleUpdateEvent event, PoolKit poolKit) Updates theBODataCollectionTemplateWOCreationRulewith all its needed components.booleanChecks if the user has the data collection module and theDataCollectionPermission.FSM_DATACOLLECTION_CONFIGURATION_EDITenabled.protected voidvalidateInput(BODataCollectionTemplateWOCreationRule dataCollectionTemplateWOCreationRule, PoolKit poolKit) Validates the input data for updating a data collection template WO creation rule.Methods inherited from class overit.geocallapp.wfm.mobileforms.bl.task.BTDataCollection
getException, 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
-
BTDataCollectionTemplateWOCreationRuleUpdate
public BTDataCollectionTemplateWOCreationRuleUpdate()
-
-
Method Details
-
isValidExecution
public boolean isValidExecution()Checks if the user has the data collection module and theDataCollectionPermission.FSM_DATACOLLECTION_CONFIGURATION_EDITenabled.- Specified by:
isValidExecutionin interfaceValidExecution- Overrides:
isValidExecutionin classBTDataCollection<DataCollectionTemplateWOCreationRuleUpdateEvent>- Returns:
- true, if the module and the permission are active, false otherwise
-
execute
protected void execute(DataCollectionTemplateWOCreationRuleUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Updates theBODataCollectionTemplateWOCreationRulewith all its needed components.- Specified by:
executein classValidExecutionBusinessTask<DataCollectionTemplateWOCreationRuleUpdateEvent>- Parameters:
event- theDataCollectionTemplateWOCreationRuleUpdateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validateInput
protected void validateInput(BODataCollectionTemplateWOCreationRule dataCollectionTemplateWOCreationRule, PoolKit poolKit) throws DAValidateException, DAException Validates the input data for updating a data collection template WO creation rule.- Parameters:
dataCollectionTemplateWOCreationRule- the data collection template WO creation rule to validatepoolKit- the pool kit for database operations- Throws:
DAValidateException- if validation fails due to:DAException- if a database error occurs during validation
-
checkExistTemplate
protected void checkExistTemplate(Long template, PoolKit poolKit) throws DAValidateException, DAException Checks if the specified data collection template exists in the database.- Parameters:
poolKit- the pool kit for database operations- Throws:
DAValidateException- if the template does not existDAException- if a database error occurs during the check
-