Class BTTimesheetReopen
java.lang.Object
overit.geocall.bl.BusinessTask<TimesheetReopenEvent>
overit.geocallapp.wfm.core.bl.timesheet.task.BTTimesheet<TimesheetReopenEvent>
overit.geocallapp.wfm.core.bl.timesheet.task.BTTimesheetReopen
- All Implemented Interfaces:
Serializable,Tool
@Event(TimesheetReopenEvent.class)
public class BTTimesheetReopen
extends BTTimesheet<TimesheetReopenEvent>
Business task in order to reopen a
When the
Timesheet. When the
TimesheetReopenEvent is launched the BT notices the call and
reopens the Timesheet basing on the event's input. Required fields:
- timesheet id
Error code:
- Since:
- 9.2
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidchangeTimesheetState(Timesheet timesheet, PoolKit poolKit) Changes the timesheet state toBOTimesheetState.Values.OPEN.protected voidcheckTimesheetState(Timesheet timesheet) Checks the timesheet state for this operation.protected voidexecute(TimesheetReopenEvent event, PoolKit poolKit) Reopens the given timesheet when its state isBOTimesheetState.Values.TO_BE_VALIDATEDorBOTimesheetState.Values.VALIDATED.protected TimesheetloadTimesheet(Long timesheetId, PoolKit poolKit) Loads theTimesheetfrom the given id.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
-
BTTimesheetReopen
public BTTimesheetReopen()
-
-
Method Details
-
execute
protected void execute(TimesheetReopenEvent event, PoolKit poolKit) throws DAException, DAValidateException Reopens the given timesheet when its state isBOTimesheetState.Values.TO_BE_VALIDATEDorBOTimesheetState.Values.VALIDATED.- Specified by:
executein classBTTimesheet<TimesheetReopenEvent>- Parameters:
event- the timesheet reopen eventpoolKit- the pool kit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadTimesheet
protected Timesheet loadTimesheet(Long timesheetId, PoolKit poolKit) throws DAValidateException, DAException Loads theTimesheetfrom the given id.- Parameters:
timesheetId- the timesheet idpoolKit- the pool kit- Returns:
- the loaded
Timesheet - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkTimesheetState
Checks the timesheet state for this operation.- Parameters:
timesheet- the timesheet aggregate- Throws:
DAValidateException- the DA validate exception
-
changeTimesheetState
protected void changeTimesheetState(Timesheet timesheet, PoolKit poolKit) throws DAValidateException, DAException Changes the timesheet state toBOTimesheetState.Values.OPEN.- Parameters:
timesheet- the timesheet aggregatepoolKit- the pool kit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-