Class BTTimesheetInsert
java.lang.Object
overit.geocall.bl.BusinessTask<TimesheetInsertEvent>
overit.geocallapp.wfm.core.bl.timesheet.task.BTTimesheet<TimesheetInsertEvent>
overit.geocallapp.wfm.core.bl.timesheet.task.BTTimesheetInsert
- All Implemented Interfaces:
Serializable,Tool
@Event(TimesheetInsertEvent.class)
public class BTTimesheetInsert
extends BTTimesheet<TimesheetInsertEvent>
Business task in order to insert a
When the
Timesheet. When the
TimesheetInsertEvent is launched the BT notices the call and
inserts the Timesheet basing on the event's input and it adds its id
to the event's journal. Error Code:
- Since:
- 9.2
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BOTimesheetHeadercreateHeader(TimesheetInsertInput input, PoolKit poolKit) Creates the timesheet header.protected voidexecute(TimesheetInsertEvent event, PoolKit poolKit) Writes the inserted timesheet header id into the event journal.protected BOProfileloadProfile(Long user, PoolKit poolKit) Loads theBOProfilerelated to the timesheet user.protected BOTimesheetTypeLoads theBOTimesheetType.protected LongsaveHeader(BOTimesheetHeader timesheetHeader, PoolKit poolKit) Saves (inserts) the timesheet header.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
-
BTTimesheetInsert
public BTTimesheetInsert()
-
-
Method Details
-
execute
protected void execute(TimesheetInsertEvent event, PoolKit poolKit) throws DAException, DAValidateException Writes the inserted timesheet header id into the event journal.- Specified by:
executein classBTTimesheet<TimesheetInsertEvent>- Parameters:
event- the timesheet insert eventpoolKit- the pool kit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
createHeader
protected BOTimesheetHeader createHeader(TimesheetInsertInput input, PoolKit poolKit) throws DAValidateException, DAException Creates the timesheet header.- Parameters:
input- the input which contains all the timesheet header's informationspoolKit- the pool kit- Returns:
- the BO timesheet header
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadProfile
Loads theBOProfilerelated to the timesheet user.- Parameters:
user- theBOSchedulingUserrelated to the timesheetpoolKit- the pool kit- Returns:
- the loaded
BOProfile - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadType
protected BOTimesheetType loadType(Long type, PoolKit poolKit) throws DAValidateException, DAException Loads theBOTimesheetType.- Parameters:
type- the id of the timesheet typepoolKit- the pool kit- Returns:
- the loaded
BOTimesheetType - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
saveHeader
protected Long saveHeader(BOTimesheetHeader timesheetHeader, PoolKit poolKit) throws DAValidateException, DAException Saves (inserts) the timesheet header.- Parameters:
timesheetHeader- the timesheet headerpoolKit- the pool kit- Returns:
- the long
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-