Class BTOperationCenterMainAddress
java.lang.Object
overit.geocall.bl.BusinessTask<OperationCenterMainAddressEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<OperationCenterMainAddressEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<OperationCenterMainAddressEvent>
overit.geocallapp.wfm.organizationalstructures.bl.operationcenter.address.task.BTOperationCenterMainAddress
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(OperationCenterMainAddressEvent.class)
public class BTOperationCenterMainAddress
extends ValidPermissionBusinessTask<OperationCenterMainAddressEvent>
Business task in order to set the main address for an operation center.
When the
When the
OperationCenterMainAddressEvent is launched the BT notices the call and updates the
main operation center address basing on the event's input. Permission:
OrganizationalStructurePermissions.STRUCTURE_VIEWOROrganizationalStructurePermissions.STRUCTURE_EDIT
Error Code:
Codes.INVALID_PROPERTY_VALUE: Invalid value for property {0}Codes.GC_NOT_FOUND: Element not found
- Since:
- 17.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 voidprotected voidexecute(OperationCenterMainAddressEvent event, PoolKit poolKit) Updates the main address for the related operation center.booleanDetermines whether the current state is valid for execution.protected voidupdate(CommandContext cc, PoolKit poolKit) protected voidupdateMainRelation(OperationCenterMainAddressInput input, PoolKit poolKit) Sets the given address as the main one for the operation center.protected voidupdateOtherRelations(OperationCenterMainAddressInput input, PoolKit poolKit) Sets all the other addresses related to the operation center as not 'main'.protected voidvalidate(OperationCenterMainAddressInput input, PoolKit pk) 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
-
BTOperationCenterMainAddress
public BTOperationCenterMainAddress()
-
-
Method Details
-
execute
protected void execute(OperationCenterMainAddressEvent event, PoolKit poolKit) throws DAException, DAValidateException Updates the main address for the related operation center.- Specified by:
executein classValidExecutionBusinessTask<OperationCenterMainAddressEvent>- Parameters:
event- theOperationCenterMainAddressEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
updateOtherRelations
protected void updateOtherRelations(OperationCenterMainAddressInput input, PoolKit poolKit) throws DAException, DAValidateException Sets all the other addresses related to the operation center as not 'main'.- Parameters:
input- theOperationCenterMainAddressInputpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
updateMainRelation
protected void updateMainRelation(OperationCenterMainAddressInput input, PoolKit poolKit) throws DAException, DAValidateException Sets the given address as the main one for the operation center.- Parameters:
input- theOperationCenterMainAddressInputpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
update
- Throws:
DAExceptionDAValidateException
-
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
protected void validate(OperationCenterMainAddressInput input, PoolKit pk) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
checkExistingRelation
protected void checkExistingRelation(OperationCenterMainAddressInput input, PoolKit pk) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-