Class BTWarehouseCentralMobileInsert
java.lang.Object
overit.geocall.bl.BusinessTask<WarehouseCentralMobileInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WarehouseCentralMobileInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WarehouseCentralMobileInsertEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<WarehouseCentralMobileInsertEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.centralmobile.task.BTWarehouseCentralMobileInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WarehouseCentralMobileInsertEvent.class)
public class BTWarehouseCentralMobileInsert
extends BTInventoryManagement<WarehouseCentralMobileInsertEvent>
Business task in order to insert a
When the
BOCentralMobileWarehouse. When the
WarehouseCentralMobileInsertEvent is launched
the BT notices the call and inserts the BOCentralMobileWarehouse basing on the event's input. Required fields:
- Mobile warehouse Id
- Central warehouse Id
Permission:
Error Code:
Codes.Inventory.RELATION_ALREADY_DEFINED: Relation already defined.Codes.Inventory.CENTRAL_WAREHOUSE_NOT_DEFINED: Central warehouse not defined.Codes.Inventory.MOBILE_WAREHOUSE_NOT_DEFINED: Mobile warehouse not defined.Codes.GC_NOT_FOUND: The resource has not been found
Visibility:
- all the warehouses that are connected to the operation centers of the user
- 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 voidcheckSchedulingResourceCentralWarehouseOC(BOCentralWarehouse centralWarehouse, Long schedulingResource, PoolKit poolKit) Checks if the Central Warehouse Operation Centers contain Scheduling Resource Operative Center.protected voidcheckUniquePreferred(BOCentralMobileWarehouse input, PoolKit poolKit) Checks if there is already a preferredBOCentralWarehousefor theBOMobileWarehouseof the current relation.protected voidcheckUniqueRelation(BOCentralMobileWarehouse input, PoolKit poolKit) Checks if the relation between the given warehouses already exists.protected voidexecute(WarehouseCentralMobileInsertEvent event, PoolKit poolKit) Inserts the givenBOCentralMobileWarehouseand writes the newly generated id into the event journal.booleanChecks if the execution is valid.protected voidvalidate(BOCentralMobileWarehouse input, PoolKit poolKit) Validates the data before the insertion.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
-
BTWarehouseCentralMobileInsert
public BTWarehouseCentralMobileInsert()
-
-
Method Details
-
execute
protected void execute(WarehouseCentralMobileInsertEvent event, PoolKit poolKit) throws DAException, DAValidateException Inserts the givenBOCentralMobileWarehouseand writes the newly generated id into the event journal.- Specified by:
executein classValidExecutionBusinessTask<WarehouseCentralMobileInsertEvent>- Parameters:
event- theWarehouseCentralMobileInsertEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validate
protected void validate(BOCentralMobileWarehouse input, PoolKit poolKit) throws DAValidateException, DAException Validates the data before the insertion.- Parameters:
input- theBOCentralMobileWarehouseto insertpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkSchedulingResourceCentralWarehouseOC
protected void checkSchedulingResourceCentralWarehouseOC(BOCentralWarehouse centralWarehouse, Long schedulingResource, PoolKit poolKit) throws DAValidateException, DAException Checks if the Central Warehouse Operation Centers contain Scheduling Resource Operative Center.- Parameters:
centralWarehouse- the currentBOMobileWarehouseschedulingResource- the currentBOSchedulingUserpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkUniqueRelation
protected void checkUniqueRelation(BOCentralMobileWarehouse input, PoolKit poolKit) throws DAValidateException, DAException Checks if the relation between the given warehouses already exists.- Parameters:
input-BOCentralMobileWarehousethe relation to insert- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
checkUniquePreferred
protected void checkUniquePreferred(BOCentralMobileWarehouse input, PoolKit poolKit) throws DAValidateException, DAException Checks if there is already a preferredBOCentralWarehousefor theBOMobileWarehouseof the current relation.- Parameters:
input-BOCentralMobileWarehousethe relation to insert- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-