Class BTMeasureUnitUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<MeasureUnitUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<MeasureUnitUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<MeasureUnitUpdateEvent>
overit.geocallapp.wfm.core.bl.base.measureunit.task.BTMeasureUnitUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(MeasureUnitUpdateEvent.class)
public class BTMeasureUnitUpdate
extends ValidPermissionBusinessTask<MeasureUnitUpdateEvent>
Business task in order to update a
When the
BOMeasureUnit. When the
MeasureUnitUpdateEvent is launched the BT notices the call
and updates the BOMeasureUnit basing on the event's input. Required fields:
- measure unit id
Permission:
WfmPermissions.FSM_CORE_ADDITIONALPARAMETER_EDIT
Error Code:
- Since:
- 9.2
- 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(BOMeasureUnit boMeasureUnit, PoolKit pk) protected voidcheckUnique(BOMeasureUnit measureUnit, PoolKit pk) Checks if the givenBOMeasureUnithas a unique code.protected voidexecute(MeasureUnitUpdateEvent event, PoolKit pk) Updates a newBOMeasureUnitwith all its needed components.booleanDetermines whether the current state is valid for execution.protected voidvalidate(BOMeasureUnit measureUnit, PoolKit pk) 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
-
BTMeasureUnitUpdate
public BTMeasureUnitUpdate()
-
-
Method Details
-
execute
protected void execute(MeasureUnitUpdateEvent event, PoolKit pk) throws DAException, DAValidateException Updates a newBOMeasureUnitwith all its needed components.- Specified by:
executein classValidExecutionBusinessTask<MeasureUnitUpdateEvent>- Parameters:
event- theMeasureUnitUpdateEventpk- 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(BOMeasureUnit measureUnit, PoolKit pk) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
checkUnique
protected void checkUnique(BOMeasureUnit measureUnit, PoolKit pk) throws DAValidateException, DAException Checks if the givenBOMeasureUnithas a unique code.- Parameters:
measureUnit- the currentBOMeasureUnitpk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
afterUpdate
-