Class BTCrewShellOperationCenterInsert
java.lang.Object
overit.geocall.bl.BusinessTask<CrewShellOperationCenterInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CrewShellOperationCenterInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CrewShellOperationCenterInsertEvent>
overit.geocallapp.wfm.core.bl.crewshell.configuration.operationcenter.task.BTCrewShellOperationCenterInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CrewShellOperationCenterInsertEvent.class)
public class BTCrewShellOperationCenterInsert
extends ValidPermissionBusinessTask<CrewShellOperationCenterInsertEvent>
Business task to insert a
When the
The insertion of a
BOCrewShellOperationCenter object. When the
CrewShellOperationCenterInsertEvent event is launched the BT notices the
call and inserts the BOCrewShellOperationCenter object basing on the event's input. The insertion of a
BOCrewShellOperationCenter object indicates the activation of
the BOCrewShell objects for the associated BOOperationCenter object. - Since:
- 16.0
- See Also:
- GCApi:
- task
-
Field Summary
FieldsFields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(CrewShellOperationCenterInsertEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.protected voidInitializes theBOCacheobject for each business object.booleanDetermines whether the current state is valid for execution.protected List<BOOperationCenter> retrieveOperationCenters(PoolKit poolKit) Retrieves the list of all theBOOperationCenterobjects (i.e., operation centers).retrieveOperationCentersIDs(PoolKit poolKit) Retrieves the list of all theBOOperationCenterobjects' IDs (i.e., the IDs of the operation centers).protected voidValidates the insertion of aBOCrewShellOperationCenterobject.protected voidvalidateExistingActivation(BOCrewShellOperationCenter input, PoolKit poolKit) Validates whether theBOCrewShellobjects (i.e., crew shells) have not already been activated for the associatedBOOperationCenterobject (i.e., operation center).protected voidvalidateOperationCenter(BOCrewShellOperationCenter input, PoolKit poolKit) Validates whether the associatedBOOperationCenterobject exists.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
-
Field Details
-
operationCenterBOCache
-
-
Constructor Details
-
BTCrewShellOperationCenterInsert
public BTCrewShellOperationCenterInsert()
-
-
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(CrewShellOperationCenterInsertEvent event, PoolKit poolKit) throws DAValidateException, DAException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<CrewShellOperationCenterInsertEvent>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAValidateException- if validation fails during executionDAException- if a data access error occurs during execution
-
validateCrewShellsActivationForOperationCenter
protected void validateCrewShellsActivationForOperationCenter(BOCrewShellOperationCenter input, PoolKit poolKit) throws DAValidateException, DAException Validates the insertion of aBOCrewShellOperationCenterobject. Remember that the insertion of aBOCrewShellOperationCenterobject implies the activation of the features related to theBOCrewShellobjects for the relatedBOOperationCenterobject. The activation is possible if and only if: the givenBOOperationCenterobject exists; theBOCrewShellobjects have not been already activated for the givenBOOperationCenterobject- Parameters:
input- theBOCrewShellOperationCenterobject to be validatedpoolKit- thePoolKitpoolKit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
validateOperationCenter
protected void validateOperationCenter(BOCrewShellOperationCenter input, PoolKit poolKit) throws DAValidateException, DAException Validates whether the associatedBOOperationCenterobject exists. If the associatedBOOperationCenterobject does not exist, it throws aDAValidateExceptionobject (i.e., CREW_SHELLS_CANNOT_BE_DEACTIVATED_FOR_UNEXISTING_OC).- Parameters:
input- theBOCrewShellOperationCenterobject to be deletedpoolKit- thePoolKitpoolKit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
validateExistingActivation
protected void validateExistingActivation(BOCrewShellOperationCenter input, PoolKit poolKit) throws DAValidateException, DAException Validates whether theBOCrewShellobjects (i.e., crew shells) have not already been activated for the associatedBOOperationCenterobject (i.e., operation center). If the crew shells have already been activated for the associated operation center, it throws aDAValidateExceptionobject (i.e., CREW_SHELLS_ALREADY_ACTIVATED_FOR_OC).- Parameters:
input- theBOCrewShellOperationCenterobject to be deletedpoolKit- thePoolKitpoolKit- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
retrieveOperationCenters
protected List<BOOperationCenter> retrieveOperationCenters(PoolKit poolKit) throws DAValidateException, DAException Retrieves the list of all theBOOperationCenterobjects (i.e., operation centers).- Parameters:
poolKit- thePoolKit- Returns:
- the list of all the operation centers
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
retrieveOperationCentersIDs
protected List<Long> retrieveOperationCentersIDs(PoolKit poolKit) throws DAException, DAValidateException Retrieves the list of all theBOOperationCenterobjects' IDs (i.e., the IDs of the operation centers).- Parameters:
poolKit- thePoolKit- Returns:
- the list of the operation centers' IDs
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
initCache
protected void initCache()Initializes theBOCacheobject for each business object.
-