Class BTOverlappingWorkShiftExceptionSearch
java.lang.Object
overit.geocall.bl.BusinessTask<OverlappingWorkShiftExceptionSearchEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<OverlappingWorkShiftExceptionSearchEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<OverlappingWorkShiftExceptionSearchEvent>
overit.geocallapp.wfm.calendars.bl.workshift.exception.task.BTOverlappingWorkShiftExceptionSearch
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(OverlappingWorkShiftExceptionSearchEvent.class)
public class BTOverlappingWorkShiftExceptionSearch
extends ValidPermissionBusinessTask<OverlappingWorkShiftExceptionSearchEvent>
Business task used to find any overlapping
BOWorkShiftException on the given day interval for the given resource.
When the OverlappingWorkShiftExceptionSearchEvent is launched the BT notices the call and
searches the list of BOWorkShiftException basing on the event's input.
- 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 voidexecute(OverlappingWorkShiftExceptionSearchEvent event, PoolKit poolKit) Writes the list of searchedBOWorkShiftExceptionthat overlap the given day interval for the given resource.booleanDetermines whether the current state is valid for execution.protected List<BOWorkShiftException> Extracts the list ofBOWorkShiftExceptions that overlap the given day interval for the given resource.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
-
BTOverlappingWorkShiftExceptionSearch
public BTOverlappingWorkShiftExceptionSearch()
-
-
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(OverlappingWorkShiftExceptionSearchEvent event, PoolKit poolKit) throws DAException, DAValidateException Writes the list of searchedBOWorkShiftExceptionthat overlap the given day interval for the given resource.- Specified by:
executein classValidExecutionBusinessTask<OverlappingWorkShiftExceptionSearchEvent>- Parameters:
event- theWorkShiftExceptionSearchEventpoolKit- thePoolKit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
searchResourceWorkShiftException
protected List<BOWorkShiftException> searchResourceWorkShiftException(OverlappingWorkShiftExceptionSearchInput input, PoolKit poolKit) throws DAException, DAValidateException Extracts the list ofBOWorkShiftExceptions that overlap the given day interval for the given resource.- Parameters:
input- theOverlappingWorkShiftExceptionSearchInputpoolKit- thePoolKit- Returns:
- the work shift exceptions that overlaps the work shifts for a given resource and for a certain day
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-