Class DefaultAvailabilityService
- java.lang.Object
-
- de.hybris.platform.sap.sapsalesordersimulation.service.impl.DefaultAvailabilityService
-
- All Implemented Interfaces:
AvailabilityService
public class DefaultAvailabilityService extends java.lang.Object implements AvailabilityService
Implementation for the Availability service.
-
-
Constructor Summary
Constructors Constructor Description DefaultAvailabilityService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,SapProductAvailability>fetchAllStockDetails(ProductModel product, java.util.Collection<WarehouseModel> sapPlants)protected voidfetchStockDetailsForWarehouses(ProductModel product, java.util.Map<java.lang.String,SapProductAvailability> allSapProductAvailabilities, java.util.Collection<WarehouseModel> warehouseWithStockFetchRequired, java.lang.String currentCustomerId)protected java.util.Collection<WarehouseModel>filterWarehousesBasedOnSAPConfigMapping(java.util.Collection<WarehouseModel> warehouses)protected de.hybris.platform.b2b.services.B2BUnitServicegetB2bUnitService()protected de.hybris.platform.store.services.BaseStoreServicegetBaseStoreService()protected java.lang.StringgetCurrentCustomerID()java.util.Collection<FutureStockModel>getFutureAvailability(ProductModel product, java.util.Collection<WarehouseModel> warehouses)Get the stock level information for the product and the warehouseSapProductAvailabilitygetProductAvailability(ProductModel productModel, BaseStoreModel baseStore)Get the SapProductAvailability (contains stock , future stock details) for the product and the given basestoreprotected SalesOrderSimulationServicegetSalesOrderSimulationService()protected SapProductAvailabilityCachegetSapProductAvailabilityCache()java.util.Collection<StockLevelModel>getStockAvailability(ProductModel product, java.util.Collection<WarehouseModel> warehouses)Get the stock level information for the product and the warehousesprotected de.hybris.platform.servicelayer.user.UserServicegetUserService()protected booleanisValidPlant(java.util.Collection<WarehouseModel> warehouses, SAPPlantLogSysOrgModel sapPlantDetails)voidsetB2bUnitService(de.hybris.platform.b2b.services.B2BUnitService b2bUnitService)voidsetBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService)voidsetSalesOrderSimulationService(SalesOrderSimulationService salesOrderSimulationService)voidsetSapProductAvailabilityCache(SapProductAvailabilityCache sapProductAvailabilityCache)voidsetUserService(de.hybris.platform.servicelayer.user.UserService userService)
-
-
-
Method Detail
-
getStockAvailability
public java.util.Collection<StockLevelModel> getStockAvailability(ProductModel product, java.util.Collection<WarehouseModel> warehouses)
Description copied from interface:AvailabilityServiceGet the stock level information for the product and the warehouses- Specified by:
getStockAvailabilityin interfaceAvailabilityService- Parameters:
product- - Product for which stock level is fetchedwarehouses- - list of warehouses for which the availability has to be fetched- Returns:
- list of StockLevelModels for the corresponding product and warehouses.
-
getFutureAvailability
public java.util.Collection<FutureStockModel> getFutureAvailability(ProductModel product, java.util.Collection<WarehouseModel> warehouses)
Description copied from interface:AvailabilityServiceGet the stock level information for the product and the warehouse- Specified by:
getFutureAvailabilityin interfaceAvailabilityService- Parameters:
product- - Product for which future stock level has to be fetchedwarehouses- - list of warehouses for which the future stock has to be fetched- Returns:
- list of StockLevelModels for the corresponding product and warehouse.
-
getProductAvailability
public SapProductAvailability getProductAvailability(ProductModel productModel, BaseStoreModel baseStore)
Description copied from interface:AvailabilityServiceGet the SapProductAvailability (contains stock , future stock details) for the product and the given basestore- Specified by:
getProductAvailabilityin interfaceAvailabilityService- Parameters:
productModel- the ProductModelbaseStore- the baseStoreModel- Returns:
- SapProductAvailability for the corresponding product and warehouse.
-
fetchAllStockDetails
protected java.util.Map<java.lang.String,SapProductAvailability> fetchAllStockDetails(ProductModel product, java.util.Collection<WarehouseModel> sapPlants)
-
fetchStockDetailsForWarehouses
protected void fetchStockDetailsForWarehouses(ProductModel product, java.util.Map<java.lang.String,SapProductAvailability> allSapProductAvailabilities, java.util.Collection<WarehouseModel> warehouseWithStockFetchRequired, java.lang.String currentCustomerId)
-
filterWarehousesBasedOnSAPConfigMapping
protected java.util.Collection<WarehouseModel> filterWarehousesBasedOnSAPConfigMapping(java.util.Collection<WarehouseModel> warehouses)
-
getCurrentCustomerID
protected java.lang.String getCurrentCustomerID()
-
isValidPlant
protected boolean isValidPlant(java.util.Collection<WarehouseModel> warehouses, SAPPlantLogSysOrgModel sapPlantDetails)
-
getBaseStoreService
protected de.hybris.platform.store.services.BaseStoreService getBaseStoreService()
-
setBaseStoreService
public void setBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService)
-
getUserService
protected de.hybris.platform.servicelayer.user.UserService getUserService()
-
setUserService
public void setUserService(de.hybris.platform.servicelayer.user.UserService userService)
-
getB2bUnitService
protected de.hybris.platform.b2b.services.B2BUnitService getB2bUnitService()
-
setB2bUnitService
public void setB2bUnitService(de.hybris.platform.b2b.services.B2BUnitService b2bUnitService)
-
getSapProductAvailabilityCache
protected SapProductAvailabilityCache getSapProductAvailabilityCache()
-
setSapProductAvailabilityCache
public void setSapProductAvailabilityCache(SapProductAvailabilityCache sapProductAvailabilityCache)
-
getSalesOrderSimulationService
protected SalesOrderSimulationService getSalesOrderSimulationService()
-
setSalesOrderSimulationService
public void setSalesOrderSimulationService(SalesOrderSimulationService salesOrderSimulationService)
-
-