Class DefaultAvailabilityService
java.lang.Object
de.hybris.platform.sap.sapsalesordersimulation.service.impl.DefaultAvailabilityService
- All Implemented Interfaces:
AvailabilityService
Implementation for the Availability service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<String,SapProductAvailability> fetchAllStockDetails(ProductModel product, Collection<WarehouseModel> sapPlants) protected voidfetchStockDetailsForWarehouses(ProductModel product, Map<String, SapProductAvailability> allSapProductAvailabilities, Collection<WarehouseModel> warehouseWithStockFetchRequired, String currentCustomerId) protected Collection<WarehouseModel>protected de.hybris.platform.b2b.services.B2BUnitServiceprotected de.hybris.platform.store.services.BaseStoreServiceprotected StringgetFutureAvailability(ProductModel product, Collection<WarehouseModel> warehouses) Get the stock level information for the product and the warehousegetProductAvailability(ProductModel productModel, BaseStoreModel baseStore) Get the SapProductAvailability (contains stock , future stock details) for the product and the given basestoreprotected SalesOrderSimulationServiceprotected SapProductAvailabilityCachegetStockAvailability(ProductModel product, Collection<WarehouseModel> warehouses) Get the stock level information for the product and the warehousesprotected de.hybris.platform.servicelayer.user.UserServiceprotected booleanisValidPlant(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)
-
Constructor Details
-
DefaultAvailabilityService
public DefaultAvailabilityService()
-
-
Method Details
-
getStockAvailability
public Collection<StockLevelModel> getStockAvailability(ProductModel product, 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 Collection<FutureStockModel> getFutureAvailability(ProductModel product, 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 Map<String,SapProductAvailability> fetchAllStockDetails(ProductModel product, Collection<WarehouseModel> sapPlants) -
fetchStockDetailsForWarehouses
protected void fetchStockDetailsForWarehouses(ProductModel product, Map<String, SapProductAvailability> allSapProductAvailabilities, Collection<WarehouseModel> warehouseWithStockFetchRequired, String currentCustomerId) -
filterWarehousesBasedOnSAPConfigMapping
protected Collection<WarehouseModel> filterWarehousesBasedOnSAPConfigMapping(Collection<WarehouseModel> warehouses) -
getCurrentCustomerID
-
isValidPlant
protected boolean isValidPlant(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
-
setSapProductAvailabilityCache
-
getSalesOrderSimulationService
-
setSalesOrderSimulationService
-