Class BTSingleTeamResourceInsert
java.lang.Object
overit.geocall.bl.BusinessTask<SingleTeamResourceInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<SingleTeamResourceInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<SingleTeamResourceInsertEvent>
overit.geocallapp.wfm.orchestrator.workforce.bl.task.BTSingleTeamResourceInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(SingleTeamResourceInsertEvent.class)
public class BTSingleTeamResourceInsert
extends ValidPermissionBusinessTask<SingleTeamResourceInsertEvent>
Business task to insert a new
BOResource.
When the SingleTeamResourceInsertEvent is launched the BT notices the call and
creates the BOResource basing on the event's input.
The SingleTeamResourceInsertEvent is composed by these steps:
- the creation of a
BOTeamwith team cardinality set asBOTeamCardinality.Values.SINGLE - the creation of the
BOResource - the creation of a
BOTeamMemberrepresenting the single resource for the just created team
BOResource is added into the event's journal. - 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 LongcreateResource(BOResource resource, PoolKit poolKit) Creates the resource.protected LongcreateSingleTeam(BOResource resourceData, PoolKit poolKit) Creates the single team.protected LongcreateTeamMember(BOResource resource, Long teamId, PoolKit poolKit) Creates the member representing the single resource for the given team.protected voidexecute(SingleTeamResourceInsertEvent event, PoolKit poolKit) Inserts the givenBOResourceand writes the newly generated id into the event journal.protected WorkforceIntegrationServicegetIntegrationService(PoolKit poolKit) Return theWorkforceIntegrationServiceused for access to other domainsbooleanDetermines whether the current state is valid for execution.protected BOTeamTypesearchSingleTeamType(PoolKit poolKit) Searches the single team type.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
-
BTSingleTeamResourceInsert
public BTSingleTeamResourceInsert()
-
-
Method Details
-
execute
protected void execute(SingleTeamResourceInsertEvent event, PoolKit poolKit) throws DAException, DAValidateException Inserts the givenBOResourceand writes the newly generated id into the event journal.- Specified by:
executein classValidExecutionBusinessTask<SingleTeamResourceInsertEvent>- Parameters:
event- theSingleTeamResourceInsertEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
createSingleTeam
protected Long createSingleTeam(BOResource resourceData, PoolKit poolKit) throws DAValidateException, DAException Creates the single team.- Parameters:
resourceData- the currentBOResourcepoolKit- thePoolKit- Returns:
- the created
BOTeamid - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
searchSingleTeamType
Searches the single team type.- Parameters:
poolKit- thePoolKit- Returns:
- the loaded single
BOTeamType - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
createResource
protected Long createResource(BOResource resource, PoolKit poolKit) throws DAValidateException, DAException Creates the resource.- Parameters:
resource- the resource data to insertpoolKit- thePoolKit- Returns:
- the created
BOResourceid - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
createTeamMember
protected Long createTeamMember(BOResource resource, Long teamId, PoolKit poolKit) throws DAValidateException, DAException Creates the member representing the single resource for the given team.- Parameters:
resource- the currentBOResourceteamId- theBOTeamidpoolKit- thePoolKit- Returns:
- the
BOTeamMemberid - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getIntegrationService
protected WorkforceIntegrationService getIntegrationService(PoolKit poolKit) throws DAValidateException Return theWorkforceIntegrationServiceused for access to other domains- Parameters:
poolKit- thePoolKit- Returns:
- Throws:
DAValidateException
-
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
-