Class BTCrewShellTechnicianAllocate
java.lang.Object
overit.geocall.bl.BusinessTask<CrewShellTechnicianAllocateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CrewShellTechnicianAllocateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CrewShellTechnicianAllocateEvent>
overit.geocallapp.wfm.core.bl.crewshell.composition.draft.task.BTCrewShellTechnicianAllocate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CrewShellTechnicianAllocateEvent.class)
public class BTCrewShellTechnicianAllocate
extends ValidPermissionBusinessTask<CrewShellTechnicianAllocateEvent>
Business task to import the
When the
BOSchedulingUser objects to be allocated in the BOCrewShell object. When the
CrewShellTechnicianAllocateEvent event is launched
the BT notices the call and import the BOSchedulingUser objects to be allocated in the BOCrewShell object. - 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 booleancheckForeman(Long crewShellId, Date allocationDate, PoolKit poolkit) Checks if there is an existingBOCrewShellDraftCompositionforeman allocated in theBOCrewShellobject.protected voidexecute(CrewShellTechnicianAllocateEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.protected voidInitializes theBOCacheobject to load aBOSchedulingUserobject.protected LonginsertCrewShellTechnicians(Long crewShellId, Long userId, Date day, PoolKit poolKit) Inserts a newBOCrewShellDraftCompositionobject.booleanDetermines whether the current state is valid for execution.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
-
BTCrewShellTechnicianAllocate
public BTCrewShellTechnicianAllocate()
-
-
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(CrewShellTechnicianAllocateEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<CrewShellTechnicianAllocateEvent>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
insertCrewShellTechnicians
protected Long insertCrewShellTechnicians(Long crewShellId, Long userId, Date day, PoolKit poolKit) throws DAValidateException, DAException Inserts a newBOCrewShellDraftCompositionobject. Remember that the composition ofBOCrewShellobject varies according to a specific day.- Parameters:
crewShellId- theBOCrewShellobject's id fielduserId- theBOSchedulingUserobject's id fieldday- theBOCrewShellDraftCompositionobject's day fieldpoolKit- thePoolKitpoolkit- Returns:
- the ID of the newly inserted
BOCrewShellDraftCompositionobject - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
checkForeman
protected boolean checkForeman(Long crewShellId, Date allocationDate, PoolKit poolkit) throws DAValidateException, DAException Checks if there is an existingBOCrewShellDraftCompositionforeman allocated in theBOCrewShellobject. If there is not an existingBOCrewShellDraftCompositionforeman, the newly insertedBOCrewShellDraftCompositionobject becomes a foreman.- Parameters:
crewShellId- theBOCrewShellobject's id fieldpoolkit- thePoolKitpoolkit- Returns:
- a Boolean value which represents the state of the control
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
initCache
protected void initCache()Initializes theBOCacheobject to load aBOSchedulingUserobject.
-