Class BTAccountUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<AccountUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<AccountUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<AccountUpdateEvent>
overit.geocallapp.wfm.accounts.bl.account.task.BTAccountUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(AccountUpdateEvent.class)
public class BTAccountUpdate
extends ValidPermissionBusinessTask<AccountUpdateEvent>
Business task in order to update a
When the
BOAccount. When the
AccountUpdateEvent is launched
the BT notices the call and updates the BOAccount basing on the event's input. Required fields:
- Account 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 voidcheckUniqueCode(BOAccount account, PoolKit poolKit) Verifies that the code of the given account is unique.protected voidexecute(AccountUpdateEvent event, PoolKit poolKit) Updates theBOAccountwith all its needed components.booleanDetermines whether the current state is valid for execution.protected voidUpdates theBOAccountby calling theBTAccountHistoryprotected voidValidates 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
-
Constructor Details
-
BTAccountUpdate
public BTAccountUpdate()
-
-
Method Details
-
execute
protected void execute(AccountUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Updates theBOAccountwith all its needed components.- Specified by:
executein classValidExecutionBusinessTask<AccountUpdateEvent>- Parameters:
event- the AccountUpdateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validate
Validates the data before the update.- Parameters:
account- theBOAccountto updatepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
update
Updates theBOAccountby calling theBTAccountHistory- Parameters:
poolKit- thePoolKitaccount- theBOAccount- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
checkUniqueCode
protected void checkUniqueCode(BOAccount account, PoolKit poolKit) throws DAValidateException, DAException Verifies that the code of the given account is unique.- Parameters:
account- the account to checkpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA 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
-