Class BTWorkCenterUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<WorkCenterUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WorkCenterUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WorkCenterUpdateEvent>
overit.geocallapp.wfm.organizationalstructures.bl.workcenter.task.BTWorkCenterUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WorkCenterUpdateEvent.class)
public class BTWorkCenterUpdate
extends ValidPermissionBusinessTask<WorkCenterUpdateEvent>
Business task in order to update a
BOWorkCenter.
When the WorkCenterUpdateEvent is launched the BT notices the call
and updates the BOWorkCenter basing on the event's input.
Required fields:
- work center id
Permission:
- fsm.core.workorder.configuration.edit
Error Code:
Codes.CODE_ALREADY_DEFINED: Cannot update work center. There is another work center with the same codeCodes.MISSING_REQUIRED_MULTILANGUAGE_VALUESCodes.PROPERTY_REQUIRED
- 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 voidafterUpdate(BOWorkCenter workCenter, PoolKit pk) Actions to perform after the insertionprotected voidcheckUniqueCode(BOWorkCenter workCenter, PoolKit poolKit) protected voidexecute(WorkCenterUpdateEvent event, PoolKit pk) Updates a newBOWorkCenterwith all its needed components.booleanDetermines whether the current state is valid for execution.protected voidvalidate(BOWorkCenter workCenter, PoolKit pk) Checks if the update is possible by performing some validations on the givenBOWorkCenterMethods 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
-
BTWorkCenterUpdate
public BTWorkCenterUpdate()
-
-
Method Details
-
execute
protected void execute(WorkCenterUpdateEvent event, PoolKit pk) throws DAException, DAValidateException Updates a newBOWorkCenterwith all its needed components.- Specified by:
executein classValidExecutionBusinessTask<WorkCenterUpdateEvent>- Parameters:
event- theWorkCenterUpdateEventpk- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate 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
-
validate
protected void validate(BOWorkCenter workCenter, PoolKit pk) throws DAValidateException, DAException Checks if the update is possible by performing some validations on the givenBOWorkCenter- Parameters:
workCenter- the work centerpk- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkUniqueCode
protected void checkUniqueCode(BOWorkCenter workCenter, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
afterUpdate
Actions to perform after the insertion- Parameters:
workCenter- the work centerpk- thePoolKit
-