Class BTWarehouseOperationHeaderUpdate
java.lang.Object
overit.geocall.bl.BusinessTask<WarehouseOperationHeaderUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WarehouseOperationHeaderUpdateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WarehouseOperationHeaderUpdateEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<WarehouseOperationHeaderUpdateEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.operation.header.task.BTWarehouseOperationHeaderUpdate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WarehouseOperationHeaderUpdateEvent.class)
public class BTWarehouseOperationHeaderUpdate
extends BTInventoryManagement<WarehouseOperationHeaderUpdateEvent>
Business task used to update the
The refusal consist in changing the incoming warehouse of the
The update is permitted only if the operation is in
When the
BOWarehouseOperationHeader after a refusal. The refusal consist in changing the incoming warehouse of the
BOWarehouseOperationHeader with the given one. The update is permitted only if the operation is in
BOWarehouseOperationHeaderState.Values.INSERTED,
BOWarehouseOperationHeaderState.Values.SENDING or BOWarehouseOperationHeaderState.Values.SENT state. When the
WarehouseOperationHeaderUpdateEvent is launched
the BT notices the call and updates the WarehouseOperation basing on the event's input. - Since:
- 14.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 oldState) Checks if theWarehouseOperationold state is valid for this process.protected voidexecute(WarehouseOperationHeaderUpdateEvent event, PoolKit poolKit) Updates theWarehouseOperationby switching outgoing data with the incoming ones.booleanDetermines whether the current state is valid for execution.protected BOWarehouseOperationHeaderloadWarehouseOperationHeader(Long headerId, PoolKit poolKit) Loads theBOWarehouseOperationHeaderfrom the given id.Prepares the filter data.Prepares the update data.protected voidupdate(WarehouseOperationHeaderUpdateInput input, PoolKit poolKit) Updates theBOWarehouseOperationHeader.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
-
BTWarehouseOperationHeaderUpdate
public BTWarehouseOperationHeaderUpdate()
-
-
Method Details
-
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
-
execute
protected void execute(WarehouseOperationHeaderUpdateEvent event, PoolKit poolKit) throws DAException, DAValidateException Updates theWarehouseOperationby switching outgoing data with the incoming ones.- Specified by:
executein classValidExecutionBusinessTask<WarehouseOperationHeaderUpdateEvent>- Parameters:
event- theWarehouseOperationHeaderUpdateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
checkValidStates
Checks if theWarehouseOperationold state is valid for this process.- Parameters:
oldState- theWarehouseOperationold state- Throws:
DAValidateException- the DA validate exception
-
update
protected void update(WarehouseOperationHeaderUpdateInput input, PoolKit poolKit) throws DAException, DAValidateException Updates theBOWarehouseOperationHeader.- Parameters:
input- theWarehouseOperationHeaderUpdateInputpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
prepareFilterData
Prepares the filter data.- Parameters:
input- theWarehouseOperationHeaderUpdateInput- Returns:
- the hash map
-
prepareUpdateData
Prepares the update data.- Parameters:
input- theWarehouseOperationHeaderUpdateInput- Returns:
- the hash map
-
loadWarehouseOperationHeader
protected BOWarehouseOperationHeader loadWarehouseOperationHeader(Long headerId, PoolKit poolKit) throws DAValidateException, DAException Loads theBOWarehouseOperationHeaderfrom the given id.- Parameters:
headerId- theBOWarehouseOperationHeaderidpoolKit- thePoolKit- Returns:
- the loaded
BOWarehouseOperationHeader - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-