Class BTSingleResourceTeamShiftDelete
java.lang.Object
overit.geocall.bl.BusinessTask<SingleResourceTeamShiftDeleteEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<SingleResourceTeamShiftDeleteEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<SingleResourceTeamShiftDeleteEvent>
overit.geocallapp.wfm.orchestrator.workforce.bl.team.shift.task.BTSingleResourceTeamShiftDelete
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(SingleResourceTeamShiftDeleteEvent.class)
public class BTSingleResourceTeamShiftDelete
extends ValidPermissionBusinessTask<SingleResourceTeamShiftDeleteEvent>
Business task in order to delete a
The delete process is divided in:
BOTeamShift related to a single BOResource. The delete process is divided in:
- deleting the
BOTeamShiftResource, i.e. the relations between theBOTeamShiftand theBOResource - deleting the
BOTeamShift - notifying the delete of the team shift
SingleResourceTeamShiftDeleteEvent is launched
the BT notices the call and deletes the BOTeamShiftResource basing on the event's input. - Since:
- 17.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddeleteTeamShift(Long teamShiftId, PoolKit poolKit) Deletes theBOTeamShiftrelated to the given id.protected voiddeleteTeamShiftResourceRelation(Long teamShiftId, Long resourceId, PoolKit poolKit) protected voidexecute(SingleResourceTeamShiftDeleteEvent event, PoolKit poolKit) Deleted theBOTeamShiftand the relatedBOResource.protected WorkforceIntegrationServicegetIntegrationService(PoolKit poolKit) Return theWorkforceIntegrationServiceused for access to other domainsbooleanDetermines whether the current state is valid for execution.protected BOTeamShiftloadTeamShift(BOWorkShift workShift, BOResource resource, PoolKit poolKit) protected List<BOTeamShiftResource> loadTeamShiftResourceRelations(Long teamShiftId, Long resourceId, PoolKit poolKit) Methods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
checkValidExecution, getException, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTSingleResourceTeamShiftDelete
public BTSingleResourceTeamShiftDelete()
-
-
Method Details
-
isValidExecution
public boolean isValidExecution()Description copied from interface:ValidExecutionDetermines whether the current state is valid for execution.- Returns:
- true if execution is valid, false otherwise
-
execute
protected void execute(SingleResourceTeamShiftDeleteEvent event, PoolKit poolKit) throws DAException, DAValidateException Deleted theBOTeamShiftand the relatedBOResource.- Specified by:
executein classValidExecutionBusinessTask<SingleResourceTeamShiftDeleteEvent>- Parameters:
event- theSingleResourceTeamShiftDeleteEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadTeamShift
protected BOTeamShift loadTeamShift(BOWorkShift workShift, BOResource resource, PoolKit poolKit) throws DAValidateException, DAException - Parameters:
workShift- theBOWorkShiftresource- theBOResourcepoolKit- thePoolKit- Returns:
- the
BOTeamShift - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadTeamShiftResourceRelations
protected List<BOTeamShiftResource> loadTeamShiftResourceRelations(Long teamShiftId, Long resourceId, PoolKit poolKit) throws DAValidateException, DAException - Parameters:
teamShiftId- theBOTeamShiftidresourceId- theBOResourceidpoolKit- thePoolKit- Returns:
- a list of
BOTeamShiftResource - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
deleteTeamShiftResourceRelation
protected void deleteTeamShiftResourceRelation(Long teamShiftId, Long resourceId, PoolKit poolKit) throws DAValidateException, DAException - Parameters:
teamShiftId- theBOTeamShiftidresourceId- theBOResourceidpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
deleteTeamShift
protected void deleteTeamShift(Long teamShiftId, PoolKit poolKit) throws DAValidateException, DAException Deletes theBOTeamShiftrelated to the given id.- Parameters:
teamShiftId- theBOTeamShiftidpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getIntegrationService
protected WorkforceIntegrationService getIntegrationService(PoolKit poolKit) throws DAValidateException Return theWorkforceIntegrationServiceused for access to other domains- Parameters:
poolKit- thePoolKit- Returns:
- Throws:
DAValidateException
-