Class BTCrewShellWorkshiftBuild
java.lang.Object
overit.geocall.bl.BusinessTask<CrewShellWorkshiftBuildEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CrewShellWorkshiftBuildEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CrewShellWorkshiftBuildEvent>
overit.geocallapp.wfm.core.bl.crewshell.workshift.task.BTCrewShellWorkshiftBuild
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CrewShellWorkshiftBuildEvent.class)
public class BTCrewShellWorkshiftBuild
extends ValidPermissionBusinessTask<CrewShellWorkshiftBuildEvent>
Business task in order to calculate all the workshift objects
CrewShellWorkshiftBuildOutput.
When the CrewShellWorkshiftBuildEvent is launched
the BT notices the call and calculates all the workshift objects CrewShellWorkshiftBuildOutput basing on the event's input.- 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 voidaddResourcesToWorkshiftsDbv(Date startDate, Date endDate, Collection<overit.geocallapp.wfm.schedulazione.utenti.Resource> resources, overit.geocallapp.wfm.ui.stato.StatoUI uiState) protected voidbuildWorkshifts(Date startDate, Date endDate, overit.geocallapp.wfm.ui.stato.StatoUI uiState) protected voidcreateCrewShellComposition(overit.geocallapp.wfm.schedulazione.utenti.Resource resource, HashGetter hgResult, overit.geocallapp.wfm.ui.stato.StatoUI uiState) protected HashGettercreateResourceWorkshifts(Date startDate, Date endDate, overit.geocallapp.wfm.schedulazione.utenti.Resource resource, overit.geocallapp.wfm.ui.stato.StatoUI uiState) protected voidprotected voidexecute(CrewShellWorkshiftBuildEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.protected voidfilterCrewShellsByComponents(Collection<Long> componentsFilter) protected overit.geocallapp.wfm.schedulazione.utenti.calendarioturni.ui.CellaCalendariogetCellaCalendario(overit.geocallapp.wfm.schedulazione.utenti.Resource resource, HashGetter hgResult, Date giorno, overit.geocallapp.wfm.ui.stato.StatoUI uiState) booleanDetermines whether the current state is valid for execution.protected voidloadCrewShellsComposition(Date start, Date end, Long operationCenter, Collection<Long> users, 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
-
BTCrewShellWorkshiftBuild
public BTCrewShellWorkshiftBuild()
-
-
Method Details
-
execute
protected void execute(CrewShellWorkshiftBuildEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<CrewShellWorkshiftBuildEvent>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
buildWorkshifts
protected void buildWorkshifts(Date startDate, Date endDate, overit.geocallapp.wfm.ui.stato.StatoUI uiState) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
addResourcesToWorkshiftsDbv
protected void addResourcesToWorkshiftsDbv(Date startDate, Date endDate, Collection<overit.geocallapp.wfm.schedulazione.utenti.Resource> resources, overit.geocallapp.wfm.ui.stato.StatoUI uiState) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
createResourceWorkshifts
protected HashGetter createResourceWorkshifts(Date startDate, Date endDate, overit.geocallapp.wfm.schedulazione.utenti.Resource resource, overit.geocallapp.wfm.ui.stato.StatoUI uiState) throws DAValidateException - Throws:
DAValidateException
-
getCellaCalendario
protected overit.geocallapp.wfm.schedulazione.utenti.calendarioturni.ui.CellaCalendario getCellaCalendario(overit.geocallapp.wfm.schedulazione.utenti.Resource resource, HashGetter hgResult, Date giorno, overit.geocallapp.wfm.ui.stato.StatoUI uiState) -
createWorkshiftDbv
protected void createWorkshiftDbv() -
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
-
loadCrewShellsComposition
protected void loadCrewShellsComposition(Date start, Date end, Long operationCenter, Collection<Long> users, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
createCrewShellComposition
protected void createCrewShellComposition(overit.geocallapp.wfm.schedulazione.utenti.Resource resource, HashGetter hgResult, overit.geocallapp.wfm.ui.stato.StatoUI uiState) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
filterCrewShellsByComponents
-