Class BTCrewShellSchedulingMassiveTransfer
java.lang.Object
overit.geocall.bl.BusinessTask<CrewShellSchedulingMassiveTransferEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CrewShellSchedulingMassiveTransferEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CrewShellSchedulingMassiveTransferEvent>
overit.geocallapp.wfm.core.bl.crewshell.scheduling.task.BTCrewShellSchedulingMassiveTransfer
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CrewShellSchedulingMassiveTransferEvent.class)
public class BTCrewShellSchedulingMassiveTransfer
extends ValidPermissionBusinessTask<CrewShellSchedulingMassiveTransferEvent>
Business task in order to transfer the
When the
BOScheduling belonging to a crew shell in a day. When the
CrewShellSchedulingMassiveTransferEvent is launched the BT notices the call and
transfers the BOScheduling basing on the event's input. Permission:
Error Code:
- Since:
- 16.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 voidalignSchedulings(List<BOWorkShift> newWorkshifts, List<BOWorkShift> oldWorkshifts, PoolKit pk) protected voiddeleteSchedulings(List<BOCrewShellComposition> oldComposition, List<BOCrewShellComposition> newComposition, Date day, Long crewShell, PoolKit poolKit) protected voidTransfer the givenBOSchedulinggetWorkshiftIds(List<BOWorkShift> newWorkshifts, List<BOWorkShift> oldWorkshifts) booleanDetermines whether the current state is valid for execution.protected voidprocessCrewShellSchedulingTransfer(Long crewShellId, Date day, List<BOCrewShellComposition> oldCompositions, PoolKit pk) protected Map<Long, BOScheduling> transferScheduling(List<BOWorkShift> workshifts, Long foreman, BOScheduling scheduling, Long crewShellUser, PoolKit pk) protected voidupdateCrewShellTechnicianSchedulings(Map<CrewShellTechnicianSchedulingKey, BOScheduling> technicianSchedulingsByCrewShellScheduling, Long crewShellSchedulingId, Map<Long, BOScheduling> schedulingsByTechnician) protected voidupdateLinkedSchedulings(Map<CrewShellTechnicianSchedulingKey, BOScheduling> technicianSchedulingsByCrewShellScheduling, PoolKit pk) 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
-
BTCrewShellSchedulingMassiveTransfer
public BTCrewShellSchedulingMassiveTransfer()
-
-
Method Details
-
execute
protected void execute(CrewShellSchedulingMassiveTransferEvent event, PoolKit pk) throws DAException, DAValidateException Transfer the givenBOScheduling- Specified by:
executein classValidExecutionBusinessTask<CrewShellSchedulingMassiveTransferEvent>- Parameters:
event- theCrewShellSchedulingMassiveTransferEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
processCrewShellSchedulingTransfer
protected void processCrewShellSchedulingTransfer(Long crewShellId, Date day, List<BOCrewShellComposition> oldCompositions, PoolKit pk) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
updateCrewShellTechnicianSchedulings
protected void updateCrewShellTechnicianSchedulings(Map<CrewShellTechnicianSchedulingKey, BOScheduling> technicianSchedulingsByCrewShellScheduling, Long crewShellSchedulingId, Map<Long, BOScheduling> schedulingsByTechnician) -
alignSchedulings
protected void alignSchedulings(List<BOWorkShift> newWorkshifts, List<BOWorkShift> oldWorkshifts, PoolKit pk) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
getWorkshiftIds
public static Set<Long> getWorkshiftIds(List<BOWorkShift> newWorkshifts, List<BOWorkShift> oldWorkshifts) -
transferScheduling
protected Map<Long,BOScheduling> transferScheduling(List<BOWorkShift> workshifts, Long foreman, BOScheduling scheduling, Long crewShellUser, PoolKit pk) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
updateLinkedSchedulings
protected void updateLinkedSchedulings(Map<CrewShellTechnicianSchedulingKey, BOScheduling> technicianSchedulingsByCrewShellScheduling, PoolKit pk) throws DAException, DAValidateException- Throws:
DAExceptionDAValidateException
-
deleteSchedulings
protected void deleteSchedulings(List<BOCrewShellComposition> oldComposition, List<BOCrewShellComposition> newComposition, Date day, Long crewShell, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
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
-