Class BTTechnicalObjectUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<TechnicalObjectUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<TechnicalObjectUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<TechnicalObjectUpdateEvent>
overit.geocallapp.wfm.core.bl.technicalobject.task.BTTechnicalObjectUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(TechnicalObjectUpdateEvent.class)
public class BTTechnicalObjectUpdate
extends ValidPermissionBusinessTask<TechnicalObjectUpdateEvent>
Business task in order to update a
When the
TechnicalObject. When the
TechnicalObjectUpdateEvent is launched the BT notices the
call and updates the TechnicalObject basing on the event's input.
Required fields:
- Technical Object
Permission:
Error Code:
Codes.C270_1554: Invalid technical object statusCodes.INVALID_PROPERTY_VALUE: Invalid value for property
Visibility:
- the new operation center must be the same of the user's operation center or null
- Since:
- 9.2
- 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(TechnicalObjectUpdateEvent event, PoolKit poolKit) Updates a newTechnicalObjectwith all its needed components, i.e. the master data along with the address informations and the feature values.booleanDetermines whether the current state is valid for execution.protected voidnotifyTechnicalObjectInsertUpdate(Long technicalObjectId, PoolKit poolKit) Notifies the system about the insertion or update of a technical object.protected voidupdateAddress(TechnicalObjectUpdateEvent event, PoolKit poolKit) Update the address associated to the technical objectprotected voidupdateHeader(TechnicalObjectUpdateEvent event, PoolKit poolKit) Update the technical object headerprotected voidvalidate(TechnicalObject technicalObject, PoolKit poolKit) 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
-
BTTechnicalObjectUpdate
public BTTechnicalObjectUpdate()
-
-
Method Details
-
execute
protected void execute(TechnicalObjectUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Updates a newTechnicalObjectwith all its needed components, i.e. the master data along with the address informations and the feature values.- Specified by:
executein classValidExecutionBusinessTask<TechnicalObjectUpdateEvent>- Parameters:
event- the technical object update eventpoolKit- the pool kit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
notifyTechnicalObjectInsertUpdate
protected void notifyTechnicalObjectInsertUpdate(Long technicalObjectId, PoolKit poolKit) throws DAException, DAValidateException Notifies the system about the insertion or update of a technical object.- Parameters:
technicalObjectId- The ID of the technical object that was inserted or updatedpoolKit- The pool kit to use for database operations- Throws:
DAException- If a data access error occursDAValidateException- If validation fails during the notification process
-
validate
protected void validate(TechnicalObject technicalObject, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
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
-
updateHeader
protected void updateHeader(TechnicalObjectUpdateEvent event, PoolKit poolKit) throws DAValidateException, DAException Update the technical object header- Parameters:
event- the technical object update eventpoolKit- the pool kit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
updateAddress
protected void updateAddress(TechnicalObjectUpdateEvent event, PoolKit poolKit) throws DAValidateException, DAException Update the address associated to the technical object- Parameters:
event- the technical object update eventpoolKit- the pool kit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-