Class BTDCTemplateVisibilityRuleHeaderUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<DCTemplateVisibilityRuleHeaderUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<DCTemplateVisibilityRuleHeaderUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<DCTemplateVisibilityRuleHeaderUpdateEvent>
overit.geocallapp.wfm.mobileforms.bl.template.visibilityrules.header.task.BTDCTemplateVisibilityRuleHeaderUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(DCTemplateVisibilityRuleHeaderUpdateEvent.class)
public class BTDCTemplateVisibilityRuleHeaderUpdate
extends ValidPermissionBusinessTask<DCTemplateVisibilityRuleHeaderUpdateEvent>
Business task to update a
BODCTemplateVisibilityRuleHeader.
Validates that:
- Code is not null and not empty
- Template exists and is immutable
- Code is unique within the Template scope (excluding current record)
Permission:
- Since:
- 22.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckUnmodifiableFields(BODCTemplateVisibilityRuleHeader dcTemplateVisibilityRuleHeader, PoolKit poolKit) Validates that unmodifiable fields are not changed.protected voidexecute(DCTemplateVisibilityRuleHeaderUpdateEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.booleanDetermines whether the current state is valid for execution.protected voidvalidate(BODCTemplateVisibilityRuleHeader dcTemplateVisibilityRuleHeader, PoolKit poolKit) Validates the input data for the template visibility rule header before updating.protected voidvalidateUniqueCode(BODCTemplateVisibilityRuleHeader dcTemplateVisibilityRuleHeader, PoolKit poolKit) Validates that the code is unique within the template scope (excluding current record).Methods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
checkValidExecution, getException, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTDCTemplateVisibilityRuleHeaderUpdate
public BTDCTemplateVisibilityRuleHeaderUpdate()
-
-
Method Details
-
execute
protected void execute(DCTemplateVisibilityRuleHeaderUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<DCTemplateVisibilityRuleHeaderUpdateEvent>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
validate
protected void validate(BODCTemplateVisibilityRuleHeader dcTemplateVisibilityRuleHeader, PoolKit poolKit) throws DAValidateException, DAException Validates the input data for the template visibility rule header before updating.Validates that:
- Code is not null and not empty
- Template exists and is immutable
- Code is unique within the Template scope (excluding current record)
- Unmodifiable fields are not changed
- Parameters:
dcTemplateVisibilityRuleHeader- theBODCTemplateVisibilityRuleHeaderto validatepoolKit- thePoolKit- Throws:
DAValidateException- if validation failsDAException- if a database access error occurs during validation
-
validateUniqueCode
protected void validateUniqueCode(BODCTemplateVisibilityRuleHeader dcTemplateVisibilityRuleHeader, PoolKit poolKit) throws DAException, DAValidateException Validates that the code is unique within the template scope (excluding current record).- Parameters:
dcTemplateVisibilityRuleHeader- theBODCTemplateVisibilityRuleHeaderpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
checkUnmodifiableFields
protected void checkUnmodifiableFields(BODCTemplateVisibilityRuleHeader dcTemplateVisibilityRuleHeader, PoolKit poolKit) throws DAValidateException, DAException Validates that unmodifiable fields are not changed.- Parameters:
dcTemplateVisibilityRuleHeader- theBODCTemplateVisibilityRuleHeaderto updatepoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
isValidExecution
public boolean isValidExecution()Description copied from interface:ValidExecutionDetermines whether the current state is valid for execution.- Returns:
- true if execution is valid, false otherwise
-