Class BTMobileWarehouseActivate
java.lang.Object
overit.geocall.bl.BusinessTask<MobileWarehouseActivateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<MobileWarehouseActivateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<MobileWarehouseActivateEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<MobileWarehouseActivateEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.mobile.task.BTMobileWarehouseActivate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(MobileWarehouseActivateEvent.class)
public class BTMobileWarehouseActivate
extends BTInventoryManagement<MobileWarehouseActivateEvent>
Business task in order to activate a
When the
BOMobileWarehouse. When the
MobileWarehouseActivateEvent is launched
the BT notices the call and activates the BOMobileWarehouse 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(BOMobileWarehouse mobileWarehouse, PoolKit poolKit) Changes the state of the givenBOMobileWarehousetoBOWarehouseState.Values.OPERATIVEby calling theWarehouseStateUpdateEvent.protected voidexecute(MobileWarehouseActivateEvent event, PoolKit poolKit) Activates the givenBOMobileWarehouse.booleanChecks if the execution is valid.protected BOMobileWarehouseloadMobileWarehouse(Long id, PoolKit poolKit) Loads theBOMobileWarehousestarting from its id.protected voidvalidate(BOMobileWarehouse mobileWarehouse, 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
-
BTMobileWarehouseActivate
public BTMobileWarehouseActivate()
-
-
Method Details
-
execute
protected void execute(MobileWarehouseActivateEvent event, PoolKit poolKit) throws DAException, DAValidateException Activates the givenBOMobileWarehouse.- Specified by:
executein classValidExecutionBusinessTask<MobileWarehouseActivateEvent>- Parameters:
event- theMobileWarehouseActivateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-
loadMobileWarehouse
protected BOMobileWarehouse loadMobileWarehouse(Long id, PoolKit poolKit) throws DAValidateException, DAException Loads theBOMobileWarehousestarting from its id.- Parameters:
id- theBOMobileWarehouseidpoolKit- thePoolKit- Returns:
- the loaded
BOMobileWarehouse - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
validate
protected void validate(BOMobileWarehouse mobileWarehouse, PoolKit poolKit) throws DAValidateException, DAException Validates the given state for the update, which can only beBOWarehouseState.Values.OPERATIVE.- Parameters:
mobileWarehouse- theBOMobileWarehousepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
changeStatus
protected void changeStatus(BOMobileWarehouse mobileWarehouse, PoolKit poolKit) throws DAValidateException, DAException Changes the state of the givenBOMobileWarehousetoBOWarehouseState.Values.OPERATIVEby calling theWarehouseStateUpdateEvent.- Parameters:
mobileWarehouse- theBOMobileWarehousepoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-