Class BTStockInsert
java.lang.Object
overit.geocall.bl.BusinessTask<StockInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<StockInsertEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<StockInsertEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<StockInsertEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.stock.task.BTStockInsert
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(StockInsertEvent.class)
public class BTStockInsert
extends BTInventoryManagement<StockInsertEvent>
Business task in order to insert a
When the
BOStock. When the
StockInsertEvent is launched
the BT notices the call and inserts the BOStock basing on the event's input. Required fields:
- Warehouse material id
- Stock type id
- Quantity
- Measure unit id
Permission:
Error Code:
Codes.Inventory.WM_NOT_DEFINED: Warehouse material not defined.Codes.Inventory.STOCK_TYPE_NOT_DEFINED: Stock type not defined.Codes.Inventory.QUANTITY_NOT_DEFINED: Quantity not defined.Codes.Inventory.MEASURE_UNIT_DEFINED:Measure unit not defined.
- 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 voidexecute(StockInsertEvent event, PoolKit poolKit) Inserts the givenBOStockand writes the newly generated id into the event journal.protected LongPerforms the insertion of the givenBOStock.booleanChecks if the execution is valid.protected voidValidates 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
-
BTStockInsert
public BTStockInsert()
-
-
Method Details
-
execute
protected void execute(StockInsertEvent event, PoolKit poolKit) throws DAException, DAValidateException Inserts the givenBOStockand writes the newly generated id into the event journal.- Specified by:
executein classValidExecutionBusinessTask<StockInsertEvent>- Parameters:
event- theStockInsertEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
validate
Validates the data before the insertion.- Parameters:
stock- theBOStockto insertpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exception
-
insert
Performs the insertion of the givenBOStock.- Parameters:
boStock- theBOStockto insertpoolKit- thePoolKit- Returns:
- the id of the inserted
BOStock - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-