Class BTTransferRequestRefuse
java.lang.Object
overit.geocall.bl.BusinessTask<TransferRequestRefuseEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<TransferRequestRefuseEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<TransferRequestRefuseEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<TransferRequestRefuseEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.transfer.request.task.BTTransferRequestRefuse
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(TransferRequestRefuseEvent.class)
public class BTTransferRequestRefuse
extends BTInventoryManagement<TransferRequestRefuseEvent>
Business task in order to refuse a
When the
TransferRequest. When the
TransferRequestRefuseEvent is launched, the BT which notices the call, performs several actions:
- it changes the
TransferRequeststate toBOTransferRequestState.Values.REFUSED - it updates the related
WarehouseOperationby setting the picking warehouse as both incoming/outgoing one. - it updates all the
WarehouseOperationItemby setting the incoming quantity as the sent one.
- 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(TransferRequestRefuseEvent event, PoolKit poolKit) Updates the state of the transfer request toBOTransferRequestState.Values.REFUSEDand updates the relatedWarehouseOperation.Returns the log helper.protected LogMessageHelperReturns the log message.booleanDetermines whether the current state is valid for execution.protected WarehouseOperationloadWarehouseOperation(Long transferRequestId, PoolKit poolKit) Loads theWarehouseOperationby its source, i.e. theTransferRequest.protected voidmanageOperation(TransferRequest transferRequest, Long pickingWarehouse, PoolKit poolKit) Updates the relatedWarehouseOperationby setting the picking warehouse as both incoming/outgoing one and proceeds with the operation receiving.protected voidnotifyStateChange(TransferRequest transferRequest, PoolKit poolKit) Notifies the change of theTransferRequeststate.protected voidopenLog()Prepares the filter data.Prepares the update data.protected voidreceiveOperation(WarehouseOperation operation, PoolKit poolKit) Starts the process of receiving the operation by calling theWarehouseOperationReceiveEvent.protected voidupdate(TransferRequestRefuseInput input, PoolKit poolKit) Updates the state of the givenTransferRequest.protected voidupdateOperation(TransferRequest transferRequest, Long pickingWarehouse, WarehouseOperation operation, PoolKit poolKit) Updates theWarehouseOperationincoming warehouse with the transfer request's picking one.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
-
BTTransferRequestRefuse
public BTTransferRequestRefuse()
-
-
Method Details
-
getLogHelper
Returns the log helper.- Returns:
- the log helper
-
getLogMessage
Returns the log message.- Returns:
- the log message
-
execute
protected void execute(TransferRequestRefuseEvent event, PoolKit poolKit) throws DAException, DAValidateException Updates the state of the transfer request toBOTransferRequestState.Values.REFUSEDand updates the relatedWarehouseOperation.- Specified by:
executein classValidExecutionBusinessTask<TransferRequestRefuseEvent>- Parameters:
event- theTransferRequestRefuseEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
openLog
- Throws:
DAValidateExceptionDAException
-
validateData
protected void validateData(TransferRequest transferRequest, PoolKit poolKit) throws DAValidateException, DAException Validates the data before the state change.- Parameters:
transferRequest- theBOTransferRequestHeaderidpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
update
protected void update(TransferRequestRefuseInput input, PoolKit poolKit) throws DAException, DAValidateException Updates the state of the givenTransferRequest.- Parameters:
input- theTransferRequestRefuseInputpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
prepareFilterData
Prepares the filter data.- Parameters:
input- theTransferRequestRefuseInput- Returns:
- the map containing the filter for the update
-
prepareUpdateData
Prepares the update data.- Parameters:
input- theTransferRequestRefuseInput- Returns:
- the map containing the values for the update
-
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
-
notifyStateChange
protected void notifyStateChange(TransferRequest transferRequest, PoolKit poolKit) throws DAValidateException, DAException Notifies the change of theTransferRequeststate.- Parameters:
transferRequest- theTransferRequestidpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
manageOperation
protected void manageOperation(TransferRequest transferRequest, Long pickingWarehouse, PoolKit poolKit) throws DAValidateException, DAException Updates the relatedWarehouseOperationby setting the picking warehouse as both incoming/outgoing one and proceeds with the operation receiving.- Parameters:
transferRequest- theTransferRequestidpickingWarehouse- the pickingBOWarehousepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
updateOperation
protected void updateOperation(TransferRequest transferRequest, Long pickingWarehouse, WarehouseOperation operation, PoolKit poolKit) throws DAValidateException, DAException Updates theWarehouseOperationincoming warehouse with the transfer request's picking one.- Parameters:
pickingWarehouse- the pickingBOWarehouseoperation- the operationpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
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(WarehouseOperation operation, PoolKit poolKit) throws DAValidateException, DAException Starts the process of receiving the operation by calling theWarehouseOperationReceiveEvent.- Parameters:
operation- theWarehouseOperationpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
loadWarehouseOperation
protected WarehouseOperation loadWarehouseOperation(Long transferRequestId, PoolKit poolKit) throws DAValidateException, DAException Loads theWarehouseOperationby its source, i.e. theTransferRequest.- Parameters:
transferRequestId- theTransferRequestidpoolKit- thePoolKit- Returns:
- the warehouse operation
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-