Class BTCharacteristicUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<CharacteristicUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CharacteristicUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CharacteristicUpdateEvent>
overit.geocallapp.wfm.orchestrator.assets.bl.characteristic.task.BTCharacteristicUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CharacteristicUpdateEvent.class)
public class BTCharacteristicUpdate
extends ValidPermissionBusinessTask<CharacteristicUpdateEvent>
Business task in order to update a
When the
BOCharacteristic. When the
CharacteristicUpdateEvent is launched the BT notices the call and updates the
BOCharacteristic basing on the event's input. Required fields:
- characteristic id
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 voidActions to perform after the update.protected voidcheckAlreadyUsed(BOCharacteristic characteristic, BOCharacteristic dbCharacteristic, PoolKit pk) Checks if the given characteristic is already used, when the data type is changedprotected voidcheckUnique(BOCharacteristic characteristic, PoolKit poolKit) Checks if the given characteristic has a unique code-class.protected voidexecute(CharacteristicUpdateEvent event, PoolKit pk) Updates a newBOCharacteristicwith all its needed components.protected AssetsIntegrationServicegetIntegrationService(PoolKit poolKit) Returns an instance ofAssetsIntegrationServicebooleanDetermines whether the current state is valid for execution.protected voidvalidate(BOCharacteristic characteristic, PoolKit poolKit) Validate the data before the insertion.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
-
BTCharacteristicUpdate
public BTCharacteristicUpdate()
-
-
Method Details
-
execute
protected void execute(CharacteristicUpdateEvent event, PoolKit pk) throws DAException, DAValidateException Updates a newBOCharacteristicwith all its needed components.- Specified by:
executein classValidExecutionBusinessTask<CharacteristicUpdateEvent>- Parameters:
event- theCharacteristicUpdateEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validate
protected void validate(BOCharacteristic characteristic, PoolKit poolKit) throws DAValidateException, DAException Validate the data before the insertion.- Parameters:
characteristic- the currentBOCharacteristicpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkAlreadyUsed
protected void checkAlreadyUsed(BOCharacteristic characteristic, BOCharacteristic dbCharacteristic, PoolKit pk) throws DAValidateException, DAException Checks if the given characteristic is already used, when the data type is changed- Parameters:
characteristic- the currentBOCharacteristicdbCharacteristic- the characteristic savedpk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkUnique
protected void checkUnique(BOCharacteristic characteristic, PoolKit poolKit) throws DAValidateException, DAException Checks if the given characteristic has a unique code-class.- Parameters:
characteristic- the currentBOCharacteristicpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getIntegrationService
protected AssetsIntegrationService getIntegrationService(PoolKit poolKit) throws DAValidateException Returns an instance ofAssetsIntegrationService- Parameters:
poolKit- thePoolKit- Returns:
- an instance of
AssetsIntegrationService - Throws:
DAValidateException
-
afterUpdate
protected void afterUpdate()Actions to perform after the update. -
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
-