Class DefaultAsnService
- java.lang.Object
-
- de.hybris.platform.warehousing.asn.service.impl.DefaultAsnService
-
- All Implemented Interfaces:
AsnService
public class DefaultAsnService extends java.lang.Object implements AsnService
The default implementation ofAsnServicewill create the stock levels for the given Advanced Shipping Notice, based on given strategies.
-
-
Constructor Summary
Constructors Constructor Description DefaultAsnService()
-
Method Summary
-
-
-
Method Detail
-
processAsn
public void processAsn(AdvancedShippingNoticeModel asn)
Description copied from interface:AsnServiceCreatesStockLevelModels based on given asn entries taken fromAdvancedShippingNoticeModel- Specified by:
processAsnin interfaceAsnService- Parameters:
asn- advanced shipping notice
-
confirmAsnReceipt
public AdvancedShippingNoticeModel confirmAsnReceipt(java.lang.String internalId)
Description copied from interface:AsnServiceConfirms the receipt of givenAdvancedShippingNoticeModel- Specified by:
confirmAsnReceiptin interfaceAsnService- Parameters:
internalId- the givenAdvancedShippingNoticeModel.INTERNALID- Returns:
- the updated
AdvancedShippingNoticeModel
-
getAsnForInternalId
public AdvancedShippingNoticeModel getAsnForInternalId(java.lang.String internalId)
Description copied from interface:AsnServiceReturnsAdvancedShippingNoticeModelfor givenAdvancedShippingNoticeModel.INTERNALID- Specified by:
getAsnForInternalIdin interfaceAsnService- Parameters:
internalId- the givenAdvancedShippingNoticeModel.INTERNALID- Returns:
- the
AdvancedShippingNoticeModel
-
getStockLevelsForAsn
public java.util.List<StockLevelModel> getStockLevelsForAsn(AdvancedShippingNoticeModel advancedShippingNotice)
Description copied from interface:AsnServiceReturns list ofStockLevelModel(s) for the givenAdvancedShippingNoticeModel- Specified by:
getStockLevelsForAsnin interfaceAsnService- Parameters:
advancedShippingNotice- theAdvancedShippingNoticeModel- Returns:
- the list of corresponding
StockLevelModel
-
cancelAsn
public AdvancedShippingNoticeModel cancelAsn(java.lang.String internalId)
Description copied from interface:AsnServiceCancels theAdvancedShippingNoticeModelfor the givenAdvancedShippingNoticeModel.INTERNALID- Specified by:
cancelAsnin interfaceAsnService- Parameters:
internalId- the givenAdvancedShippingNoticeModel.INTERNALID- Returns:
- the updated
AdvancedShippingNoticeModel
-
createStockLevel
protected void createStockLevel(AdvancedShippingNoticeEntryModel asnEntry, WarehouseModel warehouse, java.util.Date releaseDate)
CreatesStockLevelModelbased on givenAdvancedShippingNoticeEntryModel,WarehouseModeland release date.
Based onBinSelectionStrategy, product quantity taken fromAdvancedShippingNoticeEntryModelcan be divided for different bins. Therefore for each entry new stock level needs to be created.- Parameters:
asnEntry-AdvancedShippingNoticeEntryModelwhich keep information aboutProductModel.CODEand quantitywarehouse-WarehouseModelwhich needs to be added to stock levelreleaseDate- theStockLevelModel.RELEASEDATE
-
createStockLevel
protected void createStockLevel(AdvancedShippingNoticeEntryModel asnEntry, WarehouseModel warehouse, int productQuantity, java.util.Date releaseDate, java.lang.String bin)
CreatesStockLevelModelbased on givenAdvancedShippingNoticeEntryModel,WarehouseModel, productQuantity, release date and bin.- Parameters:
asnEntry- asn entry which keep information about product codewarehouse- warehouse to be assigned to the new stock levelproductQuantity- product quantityreleaseDate- release datebin- bin to be assigned to the new stock level
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getBinSelectionStrategy
protected BinSelectionStrategy getBinSelectionStrategy()
-
setBinSelectionStrategy
public void setBinSelectionStrategy(BinSelectionStrategy binSelectionStrategy)
-
getAsnReleaseDateStrategy
protected AsnReleaseDateStrategy getAsnReleaseDateStrategy()
-
setAsnReleaseDateStrategy
public void setAsnReleaseDateStrategy(AsnReleaseDateStrategy asnReleaseDateStrategy)
-
getWarehouseStockService
protected WarehouseStockService getWarehouseStockService()
-
setWarehouseStockService
public void setWarehouseStockService(WarehouseStockService warehouseStockService)
-
getAsnDao
protected AsnDao getAsnDao()
-
setAsnDao
public void setAsnDao(AsnDao asnDao)
-
getAsnWorkflowService
protected AsnWorkflowService getAsnWorkflowService()
-
setAsnWorkflowService
public void setAsnWorkflowService(AsnWorkflowService asnWorkflowService)
-
-