Class BTTimesheetValidate
java.lang.Object
overit.geocall.bl.BusinessTask<TimesheetValidateEvent>
overit.geocallapp.wfm.core.bl.timesheet.task.BTTimesheet<TimesheetValidateEvent>
overit.geocallapp.wfm.core.bl.timesheet.task.BTTimesheetValidate
- All Implemented Interfaces:
Serializable,Tool
@Event(TimesheetValidateEvent.class)
public class BTTimesheetValidate
extends BTTimesheet<TimesheetValidateEvent>
Business task that validates a timesheet.
When the
TimesheetValidateEvent is launched the BT notices the call,
checks the timesheet validation conditions and eventually changes the
Timesheet state to BOTimesheetState.Values.VALIDATED.
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.VALIDATED.protected voidcheckTimesheetState(Timesheet timesheet) Checks the timesheet state for this operation.protected voidexecute(TimesheetValidateEvent event, PoolKit poolKit) Validates the given timesheet when its state isBOTimesheetState.Values.TO_BE_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
-
BTTimesheetValidate
public BTTimesheetValidate()
-
-
Method Details
-
execute
protected void execute(TimesheetValidateEvent event, PoolKit poolKit) throws DAException, DAValidateException Validates the given timesheet when its state isBOTimesheetState.Values.TO_BE_VALIDATED.- Specified by:
executein classBTTimesheet<TimesheetValidateEvent>- Parameters:
event- theTimesheetValidateEventpoolKit- 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- theTimesheet- Throws:
DAValidateException- the DA validate exception
-
changeTimesheetState
protected void changeTimesheetState(Timesheet timesheet, PoolKit poolKit) throws DAValidateException, DAException Changes the timesheet state toBOTimesheetState.Values.VALIDATED.- Parameters:
timesheet- theTimesheetpoolKit- the pool kit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-