Class BTCrewShellSkillReplace
java.lang.Object
overit.geocall.bl.BusinessTask<CrewShellSkillReplaceEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CrewShellSkillReplaceEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CrewShellSkillReplaceEvent>
overit.geocallapp.wfm.core.bl.crewshell.skill.task.BTCrewShellSkillReplace
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CrewShellSkillReplaceEvent.class)
public class BTCrewShellSkillReplace
extends ValidPermissionBusinessTask<CrewShellSkillReplaceEvent>
Business task to replace the
When the
BOSkill objects associated with a given
BOCrewShell object. When the
CrewShellSkillReplaceEvent event is launched the BT notices
the call and replaces the BOSkill objects associated with a given
BOCrewShell object with the ones taken as input parameters. - 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 voidexecute(CrewShellSkillReplaceEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.protected List<BOCrewShellSkill> getSkillsToBeDeleted(List<BOCrewShellSkill> currentSkills, List<BOSkill> inputSkills) Determines theBOCrewShellSkillobjects to be deleted based on the currentBOSkillobjects associated with aBOCrewShellobject.getSkillsToBeInserted(List<BOCrewShellSkill> currentSkills, List<BOSkill> inputSkills) Determines theBOCrewShellSkillobjects to be inserted based on the currentBOSkillobjects associated with aBOCrewShellobject.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
-
BTCrewShellSkillReplace
public BTCrewShellSkillReplace()
-
-
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(CrewShellSkillReplaceEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<CrewShellSkillReplaceEvent>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
getSkillsToBeDeleted
protected List<BOCrewShellSkill> getSkillsToBeDeleted(List<BOCrewShellSkill> currentSkills, List<BOSkill> inputSkills) Determines theBOCrewShellSkillobjects to be deleted based on the currentBOSkillobjects associated with aBOCrewShellobject. It also determines theBOCrewShellSkillobjects to be inserted.- Parameters:
currentSkills- the list of skills currently associated with theBOCrewShellobject.inputSkills- the list of skills to be inserted.- Returns:
- a list of
BOCrewShellSkillobjects to be deleted.
-
getSkillsToBeInserted
protected List<BOSkill> getSkillsToBeInserted(List<BOCrewShellSkill> currentSkills, List<BOSkill> inputSkills) Determines theBOCrewShellSkillobjects to be inserted based on the currentBOSkillobjects associated with aBOCrewShellobject. It also determines theBOCrewShellSkillobjects to be inserted.- Parameters:
currentSkills- the list ofBOSkillobjects currently associated with theBOCrewShellobject.inputSkills- the list of skills to be inserted.- Returns:
- a list of
BOCrewShellSkillobjects to be inserted.
-