Class BTWarehouseStateUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<WarehouseStateUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WarehouseStateUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WarehouseStateUpdateEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<WarehouseStateUpdateEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.task.BTWarehouseStateUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WarehouseStateUpdateEvent.class)
public class BTWarehouseStateUpdate
extends BTInventoryManagement<WarehouseStateUpdateEvent>
Business task in order to update the state of a
When the
BOWarehouse. When the
WarehouseStateUpdateEvent is launched
the BT notices the call and updates the state of the BOWarehouse basing on the event's input
and the related rules. Required fields:
- New state id
- Old state id
Permission:
Error Code:
Codes.Inventory.STATE_NOT_EDITABLE: State not editable.
- Since:
- 13.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 voidcheckValidStates(Long newState, Long oldState) Checks whether theBOWarehousestate change is permitted and therefore if the update can be executed or not.protected voidexecute(WarehouseStateUpdateEvent event, PoolKit poolKit) Updates theBOWarehouseonly if the givenWarehouseStateUpdateInputcontains a permitted change of state.booleanDetermines whether the current state is valid for execution.protected voidupdate(WarehouseStateUpdateInput input, PoolKit poolKit) Methods inherited from class overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement
checkValidExecutionMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
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
-
BTWarehouseStateUpdate
public BTWarehouseStateUpdate()
-
-
Method Details
-
execute
protected void execute(WarehouseStateUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Updates theBOWarehouseonly if the givenWarehouseStateUpdateInputcontains a permitted change of state.- Specified by:
executein classValidExecutionBusinessTask<WarehouseStateUpdateEvent>- Parameters:
event- theWarehouseStateUpdateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
checkValidStates
Checks whether theBOWarehousestate change is permitted and therefore if the update can be executed or not.- Parameters:
newState- the new warehouse state, it cannot be nulloldState- the old warehouse state- Throws:
DAValidateException- the DA validate exception
-
update
protected void update(WarehouseStateUpdateInput input, PoolKit poolKit) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
prepareFilterData
-
prepareUpdateData
-
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
-