Class BTAssetChildRemove
java.lang.Object
overit.geocall.bl.BusinessTask<AssetChildRemoveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<AssetChildRemoveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<AssetChildRemoveEvent>
overit.geocallapp.wfm.assets.bl.task.BTAssetChildRemove
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(AssetChildRemoveEvent.class)
public class BTAssetChildRemove
extends ValidPermissionBusinessTask<AssetChildRemoveEvent>
Business task in order to delete a
When the
BOAsset as child of another given one. When the
AssetChildRemoveEvent is launched
the BT notices the call and delete the BOAsset basing on the event's input. Permission:
Error Code:
- Since:
- 16.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(AssetChildRemoveEvent event, PoolKit poolKit) Remove the givenBOAssetparent.booleanDetermines whether the current state is valid for execution.protected BOAssetLoads theBOAssetfrom the given id.protected voidupdateAsset(BOAsset asset, PoolKit poolKit) Updates the givenBOAsset.protected voidvalidate(AssetChildRemoveInput input, PoolKit poolKit) Validates the data before the removal.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
-
BTAssetChildRemove
public BTAssetChildRemove()
-
-
Method Details
-
execute
protected void execute(AssetChildRemoveEvent event, PoolKit poolKit) throws DAException, DAValidateException Remove the givenBOAssetparent.- Specified by:
executein classValidExecutionBusinessTask<AssetChildRemoveEvent>- Parameters:
event- theAssetChildInsertEventpoolKit- 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(AssetChildRemoveInput input, PoolKit poolKit) throws DAException, DAValidateException Validates the data before the removal.- Parameters:
input- theAssetChildRemoveInputpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException
-
loadAsset
Loads theBOAssetfrom the given id.- Parameters:
id- theBOAssetidpoolKit- thePoolKit- Returns:
- the loaded
BOAsset - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
updateAsset
Updates the givenBOAsset.- Parameters:
asset- theBOAssetto updatepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-