Class BTOverlappingWorkShiftSearch
java.lang.Object
overit.geocall.bl.BusinessTask<OverlappingWorkShiftSearchEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<OverlappingWorkShiftSearchEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<OverlappingWorkShiftSearchEvent>
overit.geocallapp.wfm.calendars.bl.workshift.task.BTOverlappingWorkShiftSearch
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(OverlappingWorkShiftSearchEvent.class)
public class BTOverlappingWorkShiftSearch
extends ValidPermissionBusinessTask<OverlappingWorkShiftSearchEvent>
Business task used to find any overlapping
When the
BOWorkShifts on the given day for the given resource. When the
OverlappingWorkShiftSearchEvent is launched the BT notices the call and
searches the list of overlapping BOWorkShift 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(OverlappingWorkShiftSearchEvent event, PoolKit poolKit) Writes the overlappingBOWorkShifts into the event journal.booleanDetermines whether the current state is valid for execution.protected List<BOWorkShift> searchResourceWorkShift(OverlappingWorkShiftSearchInput input, PoolKit poolKit) Extracts the overlapping shifts on the given day 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
-
BTOverlappingWorkShiftSearch
public BTOverlappingWorkShiftSearch()
-
-
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(OverlappingWorkShiftSearchEvent event, PoolKit poolKit) throws DAException, DAValidateException Writes the overlappingBOWorkShifts into the event journal.- Specified by:
executein classValidExecutionBusinessTask<OverlappingWorkShiftSearchEvent>- Parameters:
event- theOverlappingWorkShiftSearchEventpoolKit- thePoolKit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
searchResourceWorkShift
protected List<BOWorkShift> searchResourceWorkShift(OverlappingWorkShiftSearchInput input, PoolKit poolKit) throws DAException, DAValidateException Extracts the overlapping shifts on the given day for the given resource.- Parameters:
input- theOverlappingWorkShiftSearchInputpoolKit- thePoolKit- Returns:
- the list of the overlapping work shifts related to a given resource for a certain day
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-