Class BTDCTemplateVisibilityRuleHeaderInsert
java.lang.Object
overit.geocall.bl.BusinessTask<DCTemplateVisibilityRuleHeaderInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<DCTemplateVisibilityRuleHeaderInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<DCTemplateVisibilityRuleHeaderInsertEvent>
overit.geocallapp.wfm.mobileforms.bl.template.visibilityrules.header.task.BTDCTemplateVisibilityRuleHeaderInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(DCTemplateVisibilityRuleHeaderInsertEvent.class)
public class BTDCTemplateVisibilityRuleHeaderInsert
extends ValidPermissionBusinessTask<DCTemplateVisibilityRuleHeaderInsertEvent>
Business task to insert a
BODCTemplateVisibilityRuleHeader.
Validates that:
- Code is not null and not empty
- Template is not null and exists
- Code is unique within the Template scope
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 voidexecute(DCTemplateVisibilityRuleHeaderInsertEvent event, PoolKit poolKit) Inserts the givenBODCTemplateVisibilityRuleHeaderand writes the newly generated id into the event journal.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 inserting.protected voidvalidateUniqueCode(BODCTemplateVisibilityRuleHeader dcTemplateVisibilityRuleHeader, PoolKit poolKit) Validates that the code is unique within the template scope.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
-
BTDCTemplateVisibilityRuleHeaderInsert
public BTDCTemplateVisibilityRuleHeaderInsert()
-
-
Method Details
-
execute
protected void execute(DCTemplateVisibilityRuleHeaderInsertEvent event, PoolKit poolKit) throws DAException, DAValidateException Inserts the givenBODCTemplateVisibilityRuleHeaderand writes the newly generated id into the event journal.- Specified by:
executein classValidExecutionBusinessTask<DCTemplateVisibilityRuleHeaderInsertEvent>- Parameters:
event- theDCTemplateVisibilityRuleHeaderInsertEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validate
protected void validate(BODCTemplateVisibilityRuleHeader dcTemplateVisibilityRuleHeader, PoolKit poolKit) throws DAValidateException, DAException Validates the input data for the template visibility rule header before inserting.- Parameters:
dcTemplateVisibilityRuleHeader- theBODCTemplateVisibilityRuleHeaderpoolKit- 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.- Parameters:
dcTemplateVisibilityRuleHeader- theBODCTemplateVisibilityRuleHeaderpoolKit- 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
-