Class DefaultFutureStockFacade
java.lang.Object
de.hybris.platform.commercefacades.futurestock.impl.DefaultFutureStockFacade
- All Implemented Interfaces:
FutureStockFacade
- Direct Known Subclasses:
DefaultB2BFutureStockFacade,DefaultExtendedFutureStockFacade,DefaultFutureStockFacade
Default implementation for
FutureStockFacade-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilterSelectedVariantProducts(String productCode, List<String> skus) Get list of product codes from the variants of a product that match a given list of skus (product codes).protected List<FutureStockData>futureMapAsList(Map<Date, Integer> futureMap) protected CommerceCommonI18NServiceprotected LocalegetFutureAvailability(String productCode) Gets the future product availability for the specified product, for each future date.getFutureAvailability(List<String> productCodes) Gets the future product availability for the list of specified products, for each future date.getFutureAvailabilityForSelectedVariants(String productCode, List<String> skus) Gets the future product availability for the list of specified variants related to a given product.protected FutureStockServiceprotected ProductServicegetSelectedProductModels(Set<String> skus, Collection<VariantProductModel> productModels) protected voidmapMap2MapList(List<ProductModel> products, Map<String, List<FutureStockData>> result, Map<String, Map<Date, Integer>> productsMap) Fills values from a Map<String, Map<Date, Integer>> into a Map<String, List>. voidsetCommerceCommonI18NService(CommerceCommonI18NService commerceCommonI18NService) voidsetFutureStockService(FutureStockService service) voidsetProductService(ProductService productService) protected voidsortByDate(List<FutureStockData> futureList)
-
Constructor Details
-
DefaultFutureStockFacade
public DefaultFutureStockFacade()
-
-
Method Details
-
getFutureAvailability
Description copied from interface:FutureStockFacadeGets the future product availability for the specified product, for each future date.- Specified by:
getFutureAvailabilityin interfaceFutureStockFacade- Parameters:
productCode- the product code- Returns:
- A list of quantity ordered by date. If there is no availability for this product in the future, an empty list is returned.
-
getFutureAvailabilityForSelectedVariants
public Map<String,List<FutureStockData>> getFutureAvailabilityForSelectedVariants(String productCode, List<String> skus) Description copied from interface:FutureStockFacadeGets the future product availability for the list of specified variants related to a given product.- Specified by:
getFutureAvailabilityForSelectedVariantsin interfaceFutureStockFacade- Parameters:
productCode- the product codeskus- Product codes of the desired variants related to the productCode.- Returns:
- A map of product codes with a list of quantity ordered by date. If product is not variant, returns null.
-
getFutureAvailability
Description copied from interface:FutureStockFacadeGets the future product availability for the list of specified products, for each future date.- Specified by:
getFutureAvailabilityin interfaceFutureStockFacade- Parameters:
productCodes- the product codes- Returns:
- A map of product codes with a list of quantity ordered by date.
-
filterSelectedVariantProducts
Get list of product codes from the variants of a product that match a given list of skus (product codes).- Parameters:
productCode- The product that is related to the variants.skus- Product codes of the desired variants.- Returns:
- List of matching codes. If product is not variant, returns null.
-
getSelectedProductModels
protected List<String> getSelectedProductModels(Set<String> skus, Collection<VariantProductModel> productModels) -
mapMap2MapList
protected void mapMap2MapList(List<ProductModel> products, Map<String, List<FutureStockData>> result, Map<String, Map<Date, Integer>> productsMap) Fills values from a Map<String, Map<Date, Integer>> into a Map<String, List>. - Parameters:
products-result-productsMap-
-
futureMapAsList
-
sortByDate
-
getFutureStockService
-
setFutureStockService
-
getCommerceCommonI18NService
-
setCommerceCommonI18NService
-
getProductService
-
setProductService
-
getCurrentLocale
-