Class BTCentralWarehouseActivate
java.lang.Object
overit.geocall.bl.BusinessTask<CentralWarehouseActivateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<CentralWarehouseActivateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<CentralWarehouseActivateEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<CentralWarehouseActivateEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.central.task.BTCentralWarehouseActivate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(CentralWarehouseActivateEvent.class)
public class BTCentralWarehouseActivate
extends BTInventoryManagement<CentralWarehouseActivateEvent>
Business task in order to activate a
When the
BOCentralWarehouse. When the
CentralWarehouseActivateEvent is launched
the BT notices the call and activates the BOCentralWarehouse basing on the event's input. - 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 voidchangeStatus(BOCentralWarehouse centralWarehouse, PoolKit poolKit) Changes the state of the givenBOCentralWarehousetoBOWarehouseState.Values.OPERATIVEby calling theWarehouseStateUpdateEventprotected voidexecute(CentralWarehouseActivateEvent event, PoolKit poolKit) Activates the givenBOCentralWarehouse.booleanChecks if the execution is valid.protected BOCentralWarehouseloadCentralWarehouse(Long id, PoolKit poolKit) Loads theBOCentralWarehousestarting from its id.protected voidvalidate(BOCentralWarehouse centralWarehouse, PoolKit poolKit) Validates the given state for the update, which can only beBOWarehouseState.Values.OPERATIVE.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
-
BTCentralWarehouseActivate
public BTCentralWarehouseActivate()
-
-
Method Details
-
execute
protected void execute(CentralWarehouseActivateEvent event, PoolKit poolKit) throws DAException, DAValidateException Activates the givenBOCentralWarehouse.- Specified by:
executein classValidExecutionBusinessTask<CentralWarehouseActivateEvent>- Parameters:
event- theCentralWarehouseActivateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-
loadCentralWarehouse
protected BOCentralWarehouse loadCentralWarehouse(Long id, PoolKit poolKit) throws DAValidateException, DAException Loads theBOCentralWarehousestarting from its id.- Parameters:
id- theBOCentralWarehouseidpoolKit- thePoolKit- Returns:
- the loaded
BOCentralWarehouse - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
validate
protected void validate(BOCentralWarehouse centralWarehouse, PoolKit poolKit) throws DAValidateException, DAException Validates the given state for the update, which can only beBOWarehouseState.Values.OPERATIVE.- Parameters:
centralWarehouse- the currentBOCentralWarehouseto updatepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
changeStatus
protected void changeStatus(BOCentralWarehouse centralWarehouse, PoolKit poolKit) throws DAValidateException, DAException Changes the state of the givenBOCentralWarehousetoBOWarehouseState.Values.OPERATIVEby calling theWarehouseStateUpdateEvent- Parameters:
centralWarehouse- theBOCentralWarehouseto updatepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-