Class BTAssetTypeUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<AssetTypeUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<AssetTypeUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<AssetTypeUpdateEvent>
overit.geocallapp.wfm.assets.bl.type.task.BTAssetTypeUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(AssetTypeUpdateEvent.class)
public class BTAssetTypeUpdate
extends ValidPermissionBusinessTask<AssetTypeUpdateEvent>
Business task in order to update a
BOAssetType.
When the AssetTypeUpdateEvent is launched the BT notices
the call and updates the BOAssetType basing on the event's
input.
Required fields:
- asset type id
Permission:
Visibility:
- all the asset type that the type category is a facility and it's not a customer
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 voidafterUpdate(BOAssetType assetType, PoolKit pk) Actions to perform after the update.protected voidcheckUnique(BOAssetType type, PoolKit poolKit) Checks if the asset type has a unique code.protected voidexecute(AssetTypeUpdateEvent event, PoolKit pk) Writes the updated asset type into the event journal.booleanDetermines whether the current state is valid for execution.protected voidvalidate(BOAssetType assetType, PoolKit poolKit) Checks if the givenBOAssetTypecan be loaded by performing some validationsMethods 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
-
BTAssetTypeUpdate
public BTAssetTypeUpdate()
-
-
Method Details
-
execute
protected void execute(AssetTypeUpdateEvent event, PoolKit pk) throws DAException, DAValidateException Writes the updated asset type into the event journal.- Specified by:
executein classValidExecutionBusinessTask<AssetTypeUpdateEvent>- Parameters:
event- theAssetTypeUpdateEventpk- 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(BOAssetType assetType, PoolKit poolKit) throws DAValidateException, DAException Checks if the givenBOAssetTypecan be loaded by performing some validations- Parameters:
assetType- the asset typepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkUnique
protected void checkUnique(BOAssetType type, PoolKit poolKit) throws DAValidateException, DAException Checks if the asset type has a unique code.- Parameters:
type- the currentBOAssetTypepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
afterUpdate
Actions to perform after the update.- Parameters:
assetType- the asset typepk- thePoolKit
-