Class BTAddressUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<AddressUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<AddressUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<AddressUpdateEvent>
overit.geocallapp.wfm.locations.bl.address.task.BTAddressUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(AddressUpdateEvent.class)
public class BTAddressUpdate
extends ValidPermissionBusinessTask<AddressUpdateEvent>
Business task in order to update a
BOAddress.
When the AddressUpdateEvent is launched the BT notices the call and
updates the BOAddress basing on the event's input.
Required fields:
- address id
Permission:
- NONE
- Since:
- 16.0
- See Also:
- GCApi:
- task
-
Field Summary
FieldsFields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(AddressUpdateEvent event, PoolKit pk) Updates aBOAddresswith all its needed components.booleanDetermines whether the current state is valid for execution.protected voidnotifyAddressUpdate(BOAddress oldAddress, BOAddress address, PoolKit pk) Notifies the system about an address update, handling different notification types based on whether a technical object association has been created.protected voidsetGeocodingStatus(BOAddress address) When the coordinates are received in the event's input, the address is consideredBOGeocodingStatus.Values.NORMALIZED.protected voidValidate the 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
-
Field Details
-
oldAddress
-
-
Constructor Details
-
BTAddressUpdate
public BTAddressUpdate()
-
-
Method Details
-
execute
protected void execute(AddressUpdateEvent event, PoolKit pk) throws DAException, DAValidateException Updates aBOAddresswith all its needed components.- Specified by:
executein classValidExecutionBusinessTask<AddressUpdateEvent>- Parameters:
event- theAddressUpdateEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validate
Validate the data before the update.- Parameters:
address- the addresspk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
setGeocodingStatus
When the coordinates are received in the event's input, the address is consideredBOGeocodingStatus.Values.NORMALIZED.- Parameters:
address- the currentBOAddress
-
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
-
notifyAddressUpdate
protected void notifyAddressUpdate(BOAddress oldAddress, BOAddress address, PoolKit pk) throws DAException, DAValidateException Notifies the system about an address update, handling different notification types based on whether a technical object association has been created.- Parameters:
oldAddress- the previous state of the address before updateaddress- the current state of the address after updatepk- thePoolKitto use for database operations- Throws:
DAException- if a data access error occursDAValidateException- if validation fails- Since:
- 21.0
-