Class BTMaterialUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<MaterialUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<MaterialUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<MaterialUpdateEvent>
overit.geocallapp.wfm.materials.bl.material.task.BTMaterialUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(MaterialUpdateEvent.class)
public class BTMaterialUpdate
extends ValidPermissionBusinessTask<MaterialUpdateEvent>
Business task in order to update a
When the
BOMaterial. When the
MaterialUpdateEvent is launched the BT notices the call and updates the BOMaterial basing on
the event's input. - Since:
- 17.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 voidexecute(MaterialUpdateEvent event, PoolKit pk) Updates theBOMaterialwith all its needed components.booleanChecks if the execution is valid.protected voidupdate(BOMaterial boMaterial, PoolKit poolKit) Performs the update of the givenBOMaterialtogether with the correspondingBOMaterialHistory.voidvalidateData(BOMaterial material, PoolKit pk) Validates the material data before the update.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
-
BTMaterialUpdate
public BTMaterialUpdate()
-
-
Method Details
-
execute
protected void execute(MaterialUpdateEvent event, PoolKit pk) throws DAException, DAValidateException Updates theBOMaterialwith all its needed components.- Specified by:
executein classValidExecutionBusinessTask<MaterialUpdateEvent>- Parameters:
event- theMaterialUpdateEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-
validateData
Validates the material data before the update.- Parameters:
material- the current materialpk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
update
protected void update(BOMaterial boMaterial, PoolKit poolKit) throws DAException, DAValidateException Performs the update of the givenBOMaterialtogether with the correspondingBOMaterialHistory.- Parameters:
boMaterial- theBOMaterialto updatepoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-