Class BTAssetTypeInsert
java.lang.Object
overit.geocall.bl.BusinessTask<AssetTypeInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<AssetTypeInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<AssetTypeInsertEvent>
overit.geocallapp.wfm.assets.bl.type.task.BTAssetTypeInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(AssetTypeInsertEvent.class)
public class BTAssetTypeInsert
extends ValidPermissionBusinessTask<AssetTypeInsertEvent>
Business task in order to insert a
When the
BOAssetType. When the
AssetTypeInsertEvent is launched the BT notices
the call and inserts the BOAssetType basing on the event's
input. 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 voidafterInsert(BOAssetType assetType, PoolKit pk) Actions to perform after the insertion.protected voidcheckUnique(String code, PoolKit pk) Checks if the asset type has a unique code.protected voidexecute(AssetTypeInsertEvent event, PoolKit pk) Writes the inserted asset type into the event journal.booleanDetermines whether the current state is valid for execution.protected voidvalidate(BOAssetType assetType, PoolKit pk) Checks if the insertion is possible by performing some validations on the givenBOAssetTypeMethods 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
-
BTAssetTypeInsert
public BTAssetTypeInsert()
-
-
Method Details
-
execute
protected void execute(AssetTypeInsertEvent event, PoolKit pk) throws DAException, DAValidateException Writes the inserted asset type into the event journal.- Specified by:
executein classValidExecutionBusinessTask<AssetTypeInsertEvent>- Parameters:
event- theAssetTypeInsertEventpk- 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
Checks if the insertion is possible by performing some validations on the givenBOAssetType- Parameters:
assetType- the asset typepk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkUnique
Checks if the asset type has a unique code.- Parameters:
code- the codepk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
afterInsert
Actions to perform after the insertion.- Parameters:
assetType- the asset typepk- thePoolKit
-