Class BTCrewShellTechnicianDelete
java.lang.Object
overit.geocall.bl.BusinessTask<CrewShellTechnicianDeleteEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CrewShellTechnicianDeleteEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CrewShellTechnicianDeleteEvent>
overit.geocallapp.wfm.core.bl.crewshell.composition.draft.task.BTCrewShellTechnicianDelete
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CrewShellTechnicianDeleteEvent.class)
public class BTCrewShellTechnicianDelete
extends ValidPermissionBusinessTask<CrewShellTechnicianDeleteEvent>
Business task to delete a
When the
BOCrewShellDraftComposition object. When the
CrewShellTechnicianDeleteEvent event is launched the BT notices the
call and deletes the BOCrewShellDraftComposition object 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 voidalignCrewShellComposition(Long crewShellID, Date day, PoolKit pk) Aligns the composition of aBOCrewShellobject (i.e., crew shell) for the selectedDateday (i.e., composition day) if its composition changes.protected voidexecute(CrewShellTechnicianDeleteEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.protected voidInitializes theBOCacheobjects to load the correspondent business objects.booleanDetermines whether the current state is valid for execution.protected voidvalidateDeallocation(BOCrewShellDraftComposition input, PoolKit poolKit) Validates the data of theBOCrewShellDraftCompositionobject to be deleted.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
-
BTCrewShellTechnicianDelete
public BTCrewShellTechnicianDelete()
-
-
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(CrewShellTechnicianDeleteEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<CrewShellTechnicianDeleteEvent>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
validateDeallocation
protected void validateDeallocation(BOCrewShellDraftComposition input, PoolKit poolKit) throws DAValidateException, DAException Validates the data of theBOCrewShellDraftCompositionobject to be deleted. It checks if theBOCrewShellobject is active.- Parameters:
input- the currentBOCrewShellDraftCompositioninput to be validatedpoolKit- thePoolKitpoolkit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
alignCrewShellComposition
protected void alignCrewShellComposition(Long crewShellID, Date day, PoolKit pk) throws DAException, DAValidateException Aligns the composition of aBOCrewShellobject (i.e., crew shell) for the selectedDateday (i.e., composition day) if its composition changes.- Parameters:
crewShellID- the crew shell's IDday- the composition datepk- thePoolKitpoolkit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
initCache
protected void initCache()Initializes theBOCacheobjects to load the correspondent business objects.
-