Class BTTimesheetLoad
java.lang.Object
overit.geocall.bl.BusinessTask<TimesheetLoadEvent>
overit.geocallapp.wfm.core.bl.timesheet.task.BTTimesheet<TimesheetLoadEvent>
overit.geocallapp.wfm.core.bl.timesheet.task.BTTimesheetLoad
- All Implemented Interfaces:
Serializable,Tool
@Event(TimesheetLoadEvent.class)
public class BTTimesheetLoad
extends BTTimesheet<TimesheetLoadEvent>
Business task in order to load a
Timesheet.
When the TimesheetLoadEvent is launched
the BT notices the call and loads the Timesheet basing on the event's input.
The timesheet is loaded by loading each one of the its components:
- TimesheetHeaderLoadEvent allows to load BOTimesheetHeader
- TaskSearchEvent allows to load a list of BOTask- Since:
- 9.2
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(TimesheetLoadEvent event, PoolKit poolKit) Writes the loaded time sheet into the event journal.protected List<BOEventEntity> loadEventEntities(Long timesheetId, PoolKit poolKit) Loads all the event entities associated to the timesheet's tasks.protected BOTimesheetHeaderloadHeader(TimesheetLoadEvent event, PoolKit poolKit) Loads theBOTimesheetHeaderSearches for the list ofBOTaskrelated to the given time sheet idloadWarnings(Long timesheetId, PoolKit poolKit) Loads all the warning associated to the timesheet's tasks and shifts.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
-
BTTimesheetLoad
public BTTimesheetLoad()
-
-
Method Details
-
execute
protected void execute(TimesheetLoadEvent event, PoolKit poolKit) throws DAException, DAValidateException Writes the loaded time sheet into the event journal.- Specified by:
executein classBTTimesheet<TimesheetLoadEvent>- Parameters:
event- theTimesheetLoadEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadHeader
protected BOTimesheetHeader loadHeader(TimesheetLoadEvent event, PoolKit poolKit) throws DAValidateException, DAException Loads theBOTimesheetHeader- Parameters:
event- the eventpoolKit- thePoolKit- Returns:
- the BO time sheet header
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadTasks
protected List<BOTask> loadTasks(Long timesheetId, PoolKit poolKit) throws DAException, DAValidateException Searches for the list ofBOTaskrelated to the given time sheet id- Parameters:
timesheetId- the given time sheet idpoolKit- thePoolKit- Returns:
- a list of time sheet task elements of type BOTask
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception- See Also:
-
loadWarnings
protected List<BOWarning> loadWarnings(Long timesheetId, PoolKit poolKit) throws DAException, DAValidateException Loads all the warning associated to the timesheet's tasks and shifts.- Parameters:
timesheetId- the id of the time sheetpoolKit- thePoolKit- Returns:
- a list of
BOWarning - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadEventEntities
protected List<BOEventEntity> loadEventEntities(Long timesheetId, PoolKit poolKit) throws DAException, DAValidateException Loads all the event entities associated to the timesheet's tasks.- Parameters:
timesheetId- the id of the timesheetpoolKit- thePoolKit- Returns:
- a list of
BOEventEntity - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-