public class DefaultProductAvailabilityStrategy extends Object implements ProductAvailabilityStrategy
| Modifier and Type | Class and Description |
|---|---|
static interface |
DefaultProductAvailabilityStrategy.RESOURCEBUNDLE |
| Constructor and Description |
|---|
DefaultProductAvailabilityStrategy() |
| Modifier and Type | Method and Description |
|---|---|
Map<WarehouseModel,Integer> |
getAvailability(String productCode,
List<WarehouseModel> warehouses,
Date date)
Gets the product quantity for the specified product, warehouses and date.
|
Map<WarehouseModel,Date> |
getAvailability(String productCode,
List<WarehouseModel> warehouses,
int preOrderQuantity)
Returns product availability, passing product, and quantity as parameters.
|
WarehouseModel |
getBestMatchOfAvailability(Map<WarehouseModel,Date> map) |
WarehouseModel |
getBestMatchOfQuantity(Map<WarehouseModel,Integer> map) |
String |
parse(Map<WarehouseModel,Date> quantities,
String productCode,
int quantity,
LanguageModel language)
Converted the mapped availability in a textual representation.
|
String |
parse(Map<WarehouseModel,Integer> quantities,
String productCode,
Date date,
LanguageModel language)
Converted the mapped quantities in a textual representation.
|
void |
setBestMatchStrategy(BestMatchStrategy bestMatchStrategy) |
void |
setBundleProvider(ResourceBundleProvider bundleProvider) |
void |
setI18nService(I18NService i18nService) |
void |
setStockLevelDao(StockLevelDao stockLevelDao) |
public String parse(Map<WarehouseModel,Integer> quantities, String productCode, Date date, LanguageModel language)
Warehouse: {warehouse} Product: {product} Availability: {availability} Date: {date}
...
Warehouse: {warehouse} Product: {product} Availability: {availability} Date: {date}
Total: {total}
parse in interface ProductAvailabilityStrategyquantities - the mapped quantitiesproductCode - the product for which the quantities belongs todate - the date of the availability (unused yet)language - the language used for the localization processpublic String parse(Map<WarehouseModel,Date> quantities, String productCode, int quantity, LanguageModel language)
Warehouse: {warehouse} Product: {product} Availability: {availability} Date: {date}
...
Warehouse: {warehouse} Product: {product} Availability: {availability} Date: {date}
Total: {total}
parse in interface ProductAvailabilityStrategyquantities - the mapped availability datespublic Map<WarehouseModel,Integer> getAvailability(String productCode, List<WarehouseModel> warehouses, Date date)
getAvailability in interface ProductAvailabilityStrategywarehouses - the warehousesproductCode - code of the productdate - the date the specified quantity has to be available at least. ... will NOT be evaluated by this
implementation !!!public Map<WarehouseModel,Date> getAvailability(String productCode, List<WarehouseModel> warehouses, int preOrderQuantity)
getAvailability in interface ProductAvailabilityStrategyproductCode - code of the productwarehouses - the warehousespreOrderQuantity - the asked min. preOrderQuantitypublic WarehouseModel getBestMatchOfQuantity(Map<WarehouseModel,Integer> map)
getBestMatchOfQuantity in interface ProductAvailabilityStrategypublic WarehouseModel getBestMatchOfAvailability(Map<WarehouseModel,Date> map)
getBestMatchOfAvailability in interface ProductAvailabilityStrategypublic void setI18nService(I18NService i18nService)
public void setBundleProvider(ResourceBundleProvider bundleProvider)
public void setBestMatchStrategy(BestMatchStrategy bestMatchStrategy)
bestMatchStrategy - the bestMatchStrategy to setpublic void setStockLevelDao(StockLevelDao stockLevelDao)
Copyright © 2017 SAP SE. All Rights Reserved.