Class BTWorkCycleUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<WorkCycleUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WorkCycleUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WorkCycleUpdateEvent>
overit.geocallapp.wfm.workorders.bl.workcycle.task.BTWorkCycleUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WorkCycleUpdateEvent.class)
public class BTWorkCycleUpdate
extends ValidPermissionBusinessTask<WorkCycleUpdateEvent>
Business task in order to update a
Required fields:
BOWorkCycle.Required fields:
- Work cycle id
- code
- description
- work order type
Permission:
Error Code:
Codes.PROPERTY_REQUIRED: Property requiredCodes.CODE_ALREADY_DEFINED: Code already defined.Codes.MISSING_REQUIRED_MULTILANGUAGE_VALUES: Missing required multilanguage values for the property description
- Since:
- 18.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 voidafterUpdate(BOWorkCycle workCycle, PoolKit poolKit) Actions to perform after the update.protected voidcheckUniqueCode(BOWorkCycle workCycle, PoolKit poolKit) Check if there are others work cycle with the same code.protected voidexecute(WorkCycleUpdateEvent event, PoolKit poolKit) Updates a newBOWorkCyclewith all its needed components.booleanDetermines whether the current state is valid for execution.protected voidvalidate(BOWorkCycle workCycle, PoolKit poolKit) Checks if the update is possible by performing some validations on the givenBOWorkCycleMethods 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
-
BTWorkCycleUpdate
public BTWorkCycleUpdate()
-
-
Method Details
-
execute
protected void execute(WorkCycleUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Updates a newBOWorkCyclewith all its needed components.- Specified by:
executein classValidExecutionBusinessTask<WorkCycleUpdateEvent>- Parameters:
event- theWorkCycleUpdateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
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
-
validate
protected void validate(BOWorkCycle workCycle, PoolKit poolKit) throws DAValidateException, DAException Checks if the update is possible by performing some validations on the givenBOWorkCycle- Parameters:
workCycle- theBOWorkCyclepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkUniqueCode
protected void checkUniqueCode(BOWorkCycle workCycle, PoolKit poolKit) throws DAValidateException, DAException Check if there are others work cycle with the same code.- Parameters:
workCycle- theBOWorkCyclepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
afterUpdate
Actions to perform after the update.- Parameters:
workCycle- theBOWorkCyclepoolKit- thePoolKit
-