Class BTWorkShiftExceptionDelete
java.lang.Object
overit.geocall.bl.BusinessTask<WorkShiftExceptionDeleteEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WorkShiftExceptionDeleteEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WorkShiftExceptionDeleteEvent>
overit.geocallapp.wfm.calendars.bl.workshift.exception.task.BTWorkShiftExceptionDelete
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WorkShiftExceptionDeleteEvent.class)
public class BTWorkShiftExceptionDelete
extends ValidPermissionBusinessTask<WorkShiftExceptionDeleteEvent>
Business task in order to delete the
BOWorkShiftException.
When the WorkShiftExceptionDeleteEvent is launched
the BT notices the call and deletes all the needed BOWorkShiftException
basing on the event's input.
Required fields:
- Work Shift Exception ID
- Since:
- 17.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 voiddeleteDummyWorkShift(List<BOWorkShiftExceptionWorkShift> relations, PoolKit poolKit) Deletes dummy work shiftprotected voiddeleteRelation(Long workShiftExceptionId, PoolKit poolKit) Delete of work shift exception - work shift associationprotected voidexecute(WorkShiftExceptionDeleteEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.booleanDetermines whether the current state is valid for execution.protected List<BOWorkShift> loadDummyWorkShifts(List<BOWorkShiftExceptionWorkShift> workShiftExceptionWorkShiftList, PoolKit poolKit) protected List<BOWorkShiftExceptionWorkShift> loadRelations(WorkShiftExceptionWorkShiftSearchFilter workShiftExceptionWorkShiftSearchFilter, PoolKit poolKit) protected BOWorkShiftExceptionClassloadWorkShiftExceptionClass(PoolKit poolKit, BOWorkShiftExceptionType workShiftExceptionType) protected BOWorkShiftExceptionTypeloadWorkShiftExceptionType(BOWorkShiftException workShiftException, PoolKit poolKit) protected voidmanageDummyWorkShift(BOWorkShiftException workShiftException, PoolKit poolKit) If an extra presence is referred to a dummy work shift, then it is checked if it is the only one and it is eliminated, otherwise it is left.protected voidnofityDelete(BOWorkShiftException workShiftException, PoolKit poolKit) 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
-
BTWorkShiftExceptionDelete
public BTWorkShiftExceptionDelete()
-
-
Method Details
-
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
-
execute
protected void execute(WorkShiftExceptionDeleteEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<WorkShiftExceptionDeleteEvent>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
manageDummyWorkShift
protected void manageDummyWorkShift(BOWorkShiftException workShiftException, PoolKit poolKit) throws DAException, DAValidateException If an extra presence is referred to a dummy work shift, then it is checked if it is the only one and it is eliminated, otherwise it is left.- Parameters:
workShiftException- theBOWorkShiftExceptionpoolKit- thePoolKit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
loadWorkShiftExceptionType
protected BOWorkShiftExceptionType loadWorkShiftExceptionType(BOWorkShiftException workShiftException, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
loadWorkShiftExceptionClass
protected BOWorkShiftExceptionClass loadWorkShiftExceptionClass(PoolKit poolKit, BOWorkShiftExceptionType workShiftExceptionType) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
deleteDummyWorkShift
protected void deleteDummyWorkShift(List<BOWorkShiftExceptionWorkShift> relations, PoolKit poolKit) throws DAException, DAValidateException Deletes dummy work shift- Parameters:
relations- the list ofBOWorkShiftExceptionWorkShiftspoolKit- thePoolKit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
loadRelations
protected List<BOWorkShiftExceptionWorkShift> loadRelations(WorkShiftExceptionWorkShiftSearchFilter workShiftExceptionWorkShiftSearchFilter, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadDummyWorkShifts
protected List<BOWorkShift> loadDummyWorkShifts(List<BOWorkShiftExceptionWorkShift> workShiftExceptionWorkShiftList, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
deleteRelation
protected void deleteRelation(Long workShiftExceptionId, PoolKit poolKit) throws DAValidateException, DAException Delete of work shift exception - work shift association- Parameters:
workShiftExceptionId- the work shift exception idpoolKit- thePoolKit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
nofityDelete
protected void nofityDelete(BOWorkShiftException workShiftException, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-