Class BTWorkOrderOperationUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<WorkOrderOperationUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WorkOrderOperationUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WorkOrderOperationUpdateEvent>
overit.geocallapp.wfm.workorders.bl.operation.task.BTWorkOrderOperationUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WorkOrderOperationUpdateEvent.class)
public class BTWorkOrderOperationUpdate
extends ValidPermissionBusinessTask<WorkOrderOperationUpdateEvent>
Business task in order to update a
BOWorkOrderOperation.
When the WorkOrderOperationUpdateEvent is launched the BT notices the
call and updates the BOWorkOrderOperation basing on the event's
input.
Permission:
Error Code:
- Since:
- 16.0
- See Also:
-
Field Summary
FieldsFields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckWOByOperationData(BOWorkOrderOperation workOrderOperationOld) Ensures that the data related to the "order by order" management type will be edited only if the work order is in this management type.protected voidexecute(WorkOrderOperationUpdateEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.booleanDetermines whether the current state is valid for execution.protected voidmanageType(BOWorkOrderOperation workOrderOperationOld, PoolKit poolKit) protected voidsetInterventionGroup(PoolKit poolKit) protected voidupdateOperationsOrdering(PoolKit poolKit) protected voidvalidateFieldForStatus(BOWorkOrderOperation workOrderOperationOld) Checks if the work order operation fields are editable basing on the state.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
-
helper
-
-
Constructor Details
-
BTWorkOrderOperationUpdate
public BTWorkOrderOperationUpdate()
-
-
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(WorkOrderOperationUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<WorkOrderOperationUpdateEvent>- Parameters:
event- the input event to processpoolKit- thePoolKit- Throws:
DAException- if a data access error occurs during executionDAValidateException- if validation fails during execution
-
validateFieldForStatus
protected void validateFieldForStatus(BOWorkOrderOperation workOrderOperationOld) throws DAValidateException Checks if the work order operation fields are editable basing on the state.
- start date and end date can be edited only if the operation is
BOWorkOrderOperationStatus.Values.OPEN,
BOWorkOrderOperationStatus.Values.SCHEDULABLEorBOWorkOrderOperationStatus.Values.TO_RESCHEDULE - the execution order can be edited only if the operation is
BOWorkOrderOperationStatus.Values.OPEN
- Parameters:
workOrderOperationOld- the work order operation- Throws:
DAValidateException- the DA validate exception
- start date and end date can be edited only if the operation is
-
manageType
protected void manageType(BOWorkOrderOperation workOrderOperationOld, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
setInterventionGroup
- Throws:
DAValidateExceptionDAException
-
checkWOByOperationData
protected void checkWOByOperationData(BOWorkOrderOperation workOrderOperationOld) throws DAValidateException Ensures that the data related to the "order by order" management type will be edited only if the work order is in this management type.- Parameters:
workOrderOperationOld- theBOWorkOrderOperationin db- Throws:
DAValidateException- the DA validate exception
-
updateOperationsOrdering
- Throws:
DAValidateExceptionDAException
-