Class BTBundlingOperationSelect
java.lang.Object
overit.geocall.bl.BusinessTask<BundlingOperationSelectEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<BundlingOperationSelectEvent>
overit.geocallapp.wfm.bundler.bl.task.BTBundler<BundlingOperationSelectEvent>
overit.geocallapp.wfm.core.bl.bundler.bundling.task.BTBundlingOperationSelect
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(BundlingOperationSelectEvent.class)
public class BTBundlingOperationSelect
extends BTBundler<BundlingOperationSelectEvent>
Business task in order to select the list of wanted
When the
If the flag
BOWorkOrderOperation for the BundlingEvent,
mapped by the id of the work order's BOOperationCenter. When the
BundlingOperationSelectEvent is launched
the BT notices the call and selects all the BOWorkOrderOperation basing on the event's input. If the flag
BundlingOperationSelectInput.isCheckExclusions() is set to true,
the list of work order operation ids given as input is validated.
The validation consists of checking if all the work order operation ids given as input are actually loaded. - Since:
- 10.1
- See Also:
- GCApi:
- task
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(BundlingOperationSelectEvent event, PoolKit poolKit) Writes the list of loadedBOWorkOrderOperationmapped by theBOOperationCenterid into the event journal.protected StringgetWorkOrderOperationCode(Long workOrderOperationId, BundleEntitiesCache cache, PoolKit poolKit) Retrieves the code of theBOWorkOrderOperationrelated to the given id.protected PageResponse<BOWorkOrderOperation> loadWorkOrderOperations(BundlingOperationSelectInput input, PoolKit poolKit) Loads the list of neededBOWorkOrderOperationfrom the givenBundlingOperationSelectInput.protected List<BOWorkOrderOperation> removeOperations(List<BOWorkOrderOperation> operations, PoolKit poolKit) Applies other filters to bundling operations.protected List<BOWorkOrderOperation> removeOperationsWithoutValidPermit(List<BOWorkOrderOperation> woOperations, PoolKit poolKit) Removes operations without valid associated permit from input list.protected voidvalidateWorkOrderOperations(BundlingOperationSelectInput input, List<BOWorkOrderOperation> operations, PoolKit poolKit) Validates whether the list of loadedBOWorkOrderOperationcontains all the ids of the requested ones.Methods inherited from class overit.geocallapp.wfm.bundler.bl.task.BTBundler
getException, isValidExecution, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, checkValidExecution, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTBundlingOperationSelect
public BTBundlingOperationSelect()
-
-
Method Details
-
execute
protected void execute(BundlingOperationSelectEvent event, PoolKit poolKit) throws DAException, DAValidateException Writes the list of loadedBOWorkOrderOperationmapped by theBOOperationCenterid into the event journal.- Specified by:
executein classValidExecutionBusinessTask<BundlingOperationSelectEvent>- Parameters:
event- theBundlingOperationSelectEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
loadWorkOrderOperations
protected PageResponse<BOWorkOrderOperation> loadWorkOrderOperations(BundlingOperationSelectInput input, PoolKit poolKit) throws DAException, DAValidateException Loads the list of neededBOWorkOrderOperationfrom the givenBundlingOperationSelectInput.- Parameters:
input- theBundlingOperationSelectInputpoolKit- thePoolKit- Returns:
- the
PageResponsewhich contains the results, i.e. all theBOWorkOrderOperations - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
removeOperations
protected List<BOWorkOrderOperation> removeOperations(List<BOWorkOrderOperation> operations, PoolKit poolKit) throws DAException, DAValidateException Applies other filters to bundling operations.- Parameters:
operations- list ofBOWorkOrderOperationpoolKit- thePoolKit- Returns:
- the filtered list of
BOWorkOrderOperation - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
removeOperationsWithoutValidPermit
protected List<BOWorkOrderOperation> removeOperationsWithoutValidPermit(List<BOWorkOrderOperation> woOperations, PoolKit poolKit) throws DAException, DAValidateException Removes operations without valid associated permit from input list.- Parameters:
woOperations- list ofBOWorkOrderOperationpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
validateWorkOrderOperations
protected void validateWorkOrderOperations(BundlingOperationSelectInput input, List<BOWorkOrderOperation> operations, PoolKit poolKit) throws DAValidateException Validates whether the list of loadedBOWorkOrderOperationcontains all the ids of the requested ones.- Parameters:
input- theBundlingOperationSelectInputoperations- the list ofBOWorkOrderOperationpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exception
-
getWorkOrderOperationCode
protected String getWorkOrderOperationCode(Long workOrderOperationId, BundleEntitiesCache cache, PoolKit poolKit) Retrieves the code of theBOWorkOrderOperationrelated to the given id.- Parameters:
workOrderOperationId- theBOWorkOrderOperationidcache- theBundleEntitiesCachepoolKit- thePoolKit- Returns:
- the code of the
BOWorkOrderOperation
-