Class BTTimesheetAutomaticTaskUpsert
java.lang.Object
overit.geocall.bl.BusinessTask<TimesheetAutomaticTaskUpsertEvent>
overit.geocallapp.wfm.core.bl.timesheet.task.BTTimesheet<TimesheetAutomaticTaskUpsertEvent>
overit.geocallapp.wfm.core.bl.timesheet.task.BTTimesheetAutomaticTaskUpsert
- All Implemented Interfaces:
Serializable,Tool
@Event(TimesheetAutomaticTaskUpsertEvent.class)
public class BTTimesheetAutomaticTaskUpsert
extends BTTimesheet<TimesheetAutomaticTaskUpsertEvent>
Business task in order to insert or update an automatic
When the
BOTask. When the
TimesheetAutomaticTaskUpsertEvent is launched
the BT notices the call and inserts or updates the BOTask basing on the event's input. - Since:
- 9.2
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<TimesheetShiftCalculationOutput> calculateTaskShifts(Timesheet timesheet, Date startDate, Date endDate, PoolKit poolKit) protected voidcancelLinkedTasks(List<BOTask> linkedTasks, PoolKit poolKit) protected voidexecute(TimesheetAutomaticTaskUpsertEvent event, PoolKit poolKit) insertTasksWithStartEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) protected booleanprotected List<BOEventEntity> loadEventEntities(Long intervention, Long clocking, Long unavailability, PoolKit poolKit) protected BOEventEntityloadEventEntity(Long eventEntityId, Timesheet timesheet, PoolKit poolKit) protected BOTaskprotected BOTaskCategoryEventTypeloadTaskCategoryEventTypeByEndEvent(TimesheetTaskEventCache cache, Long eventType, PoolKit poolKit) protected BOTaskCategoryEventTypeloadTaskCategoryEventTypeByStartEvent(TimesheetTaskEventCache cache, Long eventType, PoolKit poolKit) loadTasksByEndEvent(Long endEventType, TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) loadTasksByEndEventEntity(Long endEventType, Collection<Long> endEventEntity, PoolKit poolKit) loadTasksByEndEventShift(Long endEventType, Long shift, PoolKit poolKit) loadTasksByFirstTask(BOTask task, PoolKit poolKit) loadTasksByLastTask(BOTask task, PoolKit poolKit) loadTasksByStartEvent(Long startEventType, TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) loadTasksByStartEventEntity(Long startEventType, Collection<Long> startEventEntity, PoolKit poolKit) loadTasksByStartEventShift(Long startEventType, Long shift, PoolKit poolKit) loadTasksWithoutEndEventType(BOTaskCategoryEventType taskCategoryEventType, PoolKit poolKit) protected TimesheetloadTimesheet(TimesheetTaskEventCache cache, Long timesheetId, PoolKit poolKit) updateTaskEndDate(Timesheet timesheet, BOTask task, Date endDate, Long endEventType, BOEventEntity endEventEntity, TimesheetTaskEventCache cache, PoolKit poolKit) updateTasksByEndEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) updateTasksByStartEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) protected voidupdateTasksDuration(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) updateTaskStartDate(Timesheet timesheet, BOTask task, Date startDate, TimesheetTaskEventCache cache, PoolKit poolKit) updateTasksWithDifferentEventEntity(List<BOTask> tasksWithDifferentEventEntity, TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) updateTasksWithEndEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) updateTasksWithSameEventEntity(List<BOTask> tasksWithSameEventEntity, TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) upsertTasksByEndEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) upsertTasksByStartEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) Methods inherited from class overit.geocallapp.wfm.core.bl.timesheet.task.BTTimesheet
body, checkTimesheetActivation, throwInactiveTimesheetExceptionMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTTimesheetAutomaticTaskUpsert
public BTTimesheetAutomaticTaskUpsert()
-
-
Method Details
-
execute
protected void execute(TimesheetAutomaticTaskUpsertEvent event, PoolKit poolKit) throws DAException, DAValidateException - Specified by:
executein classBTTimesheet<TimesheetAutomaticTaskUpsertEvent>- Throws:
DAExceptionDAValidateException
-
upsertTasksByStartEvent
protected List<BOTask> upsertTasksByStartEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
updateTasksByStartEvent
protected List<BOTask> updateTasksByStartEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
updateTaskStartDate
protected List<BOTask> updateTaskStartDate(Timesheet timesheet, BOTask task, Date startDate, TimesheetTaskEventCache cache, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
insertTasksWithStartEvent
protected List<BOTask> insertTasksWithStartEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
upsertTasksByEndEvent
protected List<BOTask> upsertTasksByEndEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
updateTasksByEndEvent
protected List<BOTask> updateTasksByEndEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
updateTasksWithEndEvent
protected List<BOTask> updateTasksWithEndEvent(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
updateTasksWithSameEventEntity
protected List<BOTask> updateTasksWithSameEventEntity(List<BOTask> tasksWithSameEventEntity, TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
updateTasksWithDifferentEventEntity
protected List<BOTask> updateTasksWithDifferentEventEntity(List<BOTask> tasksWithDifferentEventEntity, TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
updateTaskEndDate
protected List<BOTask> updateTaskEndDate(Timesheet timesheet, BOTask task, Date endDate, Long endEventType, BOEventEntity endEventEntity, TimesheetTaskEventCache cache, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
cancelLinkedTasks
protected void cancelLinkedTasks(List<BOTask> linkedTasks, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
updateTasksDuration
protected void updateTasksDuration(TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTasksByStartEvent
protected List<BOTask> loadTasksByStartEvent(Long startEventType, TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadEventEntities
protected List<BOEventEntity> loadEventEntities(Long intervention, Long clocking, Long unavailability, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTasksByStartEventEntity
protected List<BOTask> loadTasksByStartEventEntity(Long startEventType, Collection<Long> startEventEntity, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTasksByStartEventShift
protected List<BOTask> loadTasksByStartEventShift(Long startEventType, Long shift, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTasksByEndEvent
protected List<BOTask> loadTasksByEndEvent(Long endEventType, TimesheetAutomaticTaskUpsertInput input, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTasksByEndEventEntity
protected List<BOTask> loadTasksByEndEventEntity(Long endEventType, Collection<Long> endEventEntity, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTasksByEndEventShift
protected List<BOTask> loadTasksByEndEventShift(Long endEventType, Long shift, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTasksWithoutEndEventType
protected List<BOTask> loadTasksWithoutEndEventType(BOTaskCategoryEventType taskCategoryEventType, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTimesheet
-
loadTask
- Throws:
DAValidateExceptionDAException
-
loadEventEntity
protected BOEventEntity loadEventEntity(Long eventEntityId, Timesheet timesheet, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTaskCategoryEventTypeByStartEvent
protected BOTaskCategoryEventType loadTaskCategoryEventTypeByStartEvent(TimesheetTaskEventCache cache, Long eventType, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTaskCategoryEventTypeByEndEvent
protected BOTaskCategoryEventType loadTaskCategoryEventTypeByEndEvent(TimesheetTaskEventCache cache, Long eventType, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTasksByFirstTask
protected List<BOTask> loadTasksByFirstTask(BOTask task, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
loadTasksByLastTask
protected List<BOTask> loadTasksByLastTask(BOTask task, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
isSameShift
protected boolean isSameShift(Timesheet timesheet, BOTask task, Date startDate, Date endDate, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
calculateTaskShifts
protected List<TimesheetShiftCalculationOutput> calculateTaskShifts(Timesheet timesheet, Date startDate, Date endDate, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-