Class BTCentralWarehouseDeactivate
java.lang.Object
overit.geocall.bl.BusinessTask<CentralWarehouseDeactivateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CentralWarehouseDeactivateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CentralWarehouseDeactivateEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<CentralWarehouseDeactivateEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.task.BTWarehouseDeactivate<CentralWarehouseDeactivateEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.central.task.BTCentralWarehouseDeactivate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CentralWarehouseDeactivateEvent.class)
public class BTCentralWarehouseDeactivate
extends BTWarehouseDeactivate<CentralWarehouseDeactivateEvent>
Business task in order to deactivate a
When the
BOWarehouse. When the
CentralWarehouseDeactivateEvent is launched
the BT notices the call and activates the BOWarehouse 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 voidchangeStatus(BOWarehouse centralWarehouse, PoolKit poolKit) Changes the state of the givenBOWarehousetoBOWarehouseState.Values.INOPERATIVEby calling theWarehouseStateUpdateEventprotected voidexecute(CentralWarehouseDeactivateEvent event, PoolKit poolKit) Deactivates the givenBOWarehouse.booleanChecks if the execution is valid.protected voidValidates the given state for the update, which can only beBOWarehouseState.Values.INOPERATIVE.Methods inherited from class overit.geocallapp.wfm.inventory.bl.warehouse.task.BTWarehouseDeactivate
checkIfLinkedWarehouse, checkMaterialsInStocks, checkTransferRequests, loadWarehouseMethods 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
-
BTCentralWarehouseDeactivate
public BTCentralWarehouseDeactivate()
-
-
Method Details
-
execute
protected void execute(CentralWarehouseDeactivateEvent event, PoolKit poolKit) throws DAException, DAValidateException Deactivates the givenBOWarehouse.- Specified by:
executein classValidExecutionBusinessTask<CentralWarehouseDeactivateEvent>- Parameters:
event- theCentralWarehouseDeactivateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-
validate
protected void validate(Long warehouseId, Long state, PoolKit poolKit) throws DAValidateException, DAException Validates the given state for the update, which can only beBOWarehouseState.Values.INOPERATIVE.- Parameters:
warehouseId- theBOWarehouseidpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
changeStatus
protected void changeStatus(BOWarehouse centralWarehouse, PoolKit poolKit) throws DAValidateException, DAException Changes the state of the givenBOWarehousetoBOWarehouseState.Values.INOPERATIVEby calling theWarehouseStateUpdateEvent- Parameters:
centralWarehouse- theBOWarehouseto updatepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-