Class BTCrewShellInsert
java.lang.Object
overit.geocall.bl.BusinessTask<CrewShellInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CrewShellInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CrewShellInsertEvent>
overit.geocallapp.wfm.crewshell.bl.task.BTCrewShellManagement<CrewShellInsertEvent>
overit.geocallapp.wfm.core.bl.crewshell.task.BTCrewShellInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CrewShellInsertEvent.class)
public class BTCrewShellInsert
extends BTCrewShellManagement<CrewShellInsertEvent>
Business task in order to insert a
When the
BOCrewShell object. When the
CrewShellInsertEvent event is launched the BT notices the
call and inserts the BOCrewShell 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 LongcreateDummyUser(BOCrewShell crewShell, PoolKit pk) Creates aBOSchedulingUserobject (i.e., the dummy user) associated with theBOCrewShellobject.protected voidexecute(CrewShellInsertEvent event, PoolKit pk) Executes the actual business logic after validation has passed.protected BOCrewShellConfigurationRetrieves theBOCrewShellConfigurationobject, which represents theBOCrewShellobject's configuration.protected voidvalidateInput(BOCrewShell input, PoolKit pk) Validates theBOCrewShellobject data before its insertion.protected voidvalidateOperationCenter(BOCrewShell input, PoolKit pk) Validates the operation center: user must be enabled for that operation centerMethods inherited from class overit.geocallapp.wfm.crewshell.bl.task.BTCrewShellManagement
isValidExecution, retrieveCrewShellsByCode, validateCodeDuplication, validateCrewSize, validateFieldsLength, validateMandatoryFieldsMethods 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
-
BTCrewShellInsert
public BTCrewShellInsert()
-
-
Method Details
-
execute
protected void execute(CrewShellInsertEvent event, PoolKit pk) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<CrewShellInsertEvent>- Parameters:
event- the input event to processpk- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
validateInput
Validates theBOCrewShellobject data before its insertion.- Parameters:
input- theBOCrewShellobject to be insertedpk- thePoolKitpk- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
validateOperationCenter
Validates the operation center: user must be enabled for that operation center- Parameters:
input- theBOCrewShellobject to be insertedpk- thePoolKitpk- Throws:
DAValidateException- if there is a data validation exception
-
createDummyUser
protected Long createDummyUser(BOCrewShell crewShell, PoolKit pk) throws DAValidateException, DAException Creates aBOSchedulingUserobject (i.e., the dummy user) associated with theBOCrewShellobject.- Parameters:
crewShell- theBOCrewShellobject to be insertedpk- thePoolKitpk- Returns:
- the ID of the newly inserted dummy user
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
getConfiguration
Retrieves theBOCrewShellConfigurationobject, which represents theBOCrewShellobject's configuration. It performs a search for theBOCrewShellConfigurationobjects and returns the firstBOCrewShellConfigurationobject found. If noBOCrewShellConfigurationobject has been found aDAValidateExceptionobject is thrown with a custom code.- Returns:
- the
BOCrewShellConfigurationobject - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-