Class BTTransferRequestReceive
java.lang.Object
overit.geocall.bl.BusinessTask<TransferRequestReceiveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<TransferRequestReceiveEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<TransferRequestReceiveEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<TransferRequestReceiveEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.transfer.request.task.BTTransferRequestReceive
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(TransferRequestReceiveEvent.class)
public class BTTransferRequestReceive
extends BTInventoryManagement<TransferRequestReceiveEvent>
Business task in order to receive a
When the
TransferRequest. When the
TransferRequestReceiveEvent is launched
the BT notices the call and changes the TransferRequest state to BOTransferRequestState.Values.RECEIVED 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 voidexecute(TransferRequestReceiveEvent event, PoolKit poolKit) Executes the receive action by updating all the necessary info on both the currentTransferRequestand the relatedWarehouseOperation.Returns the log helper.protected LogMessageHelperbooleanChecks if the execution is valid.protected WarehouseOperationloadWarehouseOperation(TransferRequest transferRequest, PoolKit poolKit) Loads theWarehouseOperationrelated to the currentTransferRequest.protected voidnotifyStateChange(Long transferRequestId, PoolKit poolKit) Notifies the change of theTransferRequeststate.protected voidopenLog()Prepares the filter data.Prepares the update data.protected voidreceiveOperation(Date receivingDate, WarehouseOperation operation, PoolKit poolKit) Calls theWarehouseOperationReceiveEventto handle the warehouse transaction.protected voidupdate(TransferRequestReceiveInput input, PoolKit poolKit) Updates the state of the transfer request toBOTransferRequestState.Values.RECEIVED.protected voidupdateOperationReceivingData(TransferRequest transferRequest, WarehouseOperation operation, PoolKit poolKit) Updates theWarehouseOperationwith the receiving information, such as the receiving quantities.protected voidvalidateData(TransferRequest transferRequest, PoolKit poolKit) Validates the data before the state change.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
-
BTTransferRequestReceive
public BTTransferRequestReceive()
-
-
Method Details
-
getLogHelper
Returns the log helper.- Returns:
- the log helper
-
getLogMessage
-
execute
protected void execute(TransferRequestReceiveEvent event, PoolKit poolKit) throws DAException, DAValidateException Executes the receive action by updating all the necessary info on both the currentTransferRequestand the relatedWarehouseOperation.- Specified by:
executein classValidExecutionBusinessTask<TransferRequestReceiveEvent>- Parameters:
event- theTransferRequestReceiveEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
openLog
- Throws:
DAValidateExceptionDAException
-
updateOperationReceivingData
protected void updateOperationReceivingData(TransferRequest transferRequest, WarehouseOperation operation, PoolKit poolKit) throws DAValidateException, DAException Updates theWarehouseOperationwith the receiving information, such as the receiving quantities.- Parameters:
transferRequest- theTransferRequestoperation- theWarehouseOperationpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
receiveOperation
protected void receiveOperation(Date receivingDate, WarehouseOperation operation, PoolKit poolKit) throws DAValidateException, DAException Calls theWarehouseOperationReceiveEventto handle the warehouse transaction.- Parameters:
receivingDate- the receiving dateoperation- theWarehouseOperationpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadWarehouseOperation
protected WarehouseOperation loadWarehouseOperation(TransferRequest transferRequest, PoolKit poolKit) throws DAValidateException, DAException Loads theWarehouseOperationrelated to the currentTransferRequest.- Parameters:
transferRequest- the currentTransferRequestpoolKit- thePoolKit- Returns:
- the loaded
WarehouseOperation - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
validateData
protected void validateData(TransferRequest transferRequest, PoolKit poolKit) throws DAValidateException, DAException Validates the data before the state change.- Parameters:
transferRequest- the transfer requestpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
update
protected void update(TransferRequestReceiveInput input, PoolKit poolKit) throws DAException, DAValidateException Updates the state of the transfer request toBOTransferRequestState.Values.RECEIVED.- Parameters:
input- theTransferRequestReceiveInputpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
prepareFilterData
Prepares the filter data.- Parameters:
input- theTransferRequestReceiveInput- Returns:
- the map containing the filter for the update
-
prepareUpdateData
Prepares the update data.- Parameters:
input- theTransferRequestReceiveInput- Returns:
- the map containing the values for the update
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-
notifyStateChange
protected void notifyStateChange(Long transferRequestId, PoolKit poolKit) throws DAValidateException, DAException Notifies the change of theTransferRequeststate.- Parameters:
transferRequestId- theTransferRequestidpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-