Class ProductStockLevelStatusValueProvider
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.provider.impl.AbstractPropertyFieldValueProvider
-
- de.hybris.platform.commerceservices.search.solrfacetsearch.provider.impl.ProductStockLevelStatusValueProvider
-
- All Implemented Interfaces:
FieldValueProvider
- Direct Known Subclasses:
VariantProductStockLevelStatusValueProvider
public class ProductStockLevelStatusValueProvider extends AbstractPropertyFieldValueProvider implements FieldValueProvider
This ValueProvider will provide the product stock level status. The stock level count changes so frequently that it is not sensible to index the count directly, but rather to map the count to a status (or band) and then index the status.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractPropertyFieldValueProvider
i18nService, localeService, modelService, rangeNameProvider
-
-
Constructor Summary
Constructors Constructor Description ProductStockLevelStatusValueProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddFieldValues(java.util.List<FieldValue> fieldValues, IndexedProperty indexedProperty, java.lang.Object value)protected java.util.List<FieldValue>createFieldValue(ProductModel product, BaseStoreModel baseStore, IndexedProperty indexedProperty)protected CommerceStockServicegetCommerceStockService()protected FieldNameProvidergetFieldNameProvider()java.util.Collection<FieldValue>getFieldValues(IndexConfig indexConfig, IndexedProperty indexedProperty, java.lang.Object model)Returns a collection ofFieldValueof a given indexedProperty that are fetched from the model based on the indexConfig.protected StockLevelStatusgetProductStockLevelStatus(ProductModel product, BaseStoreModel baseStore)voidsetCommerceStockService(CommerceStockService commerceStockService)voidsetFieldNameProvider(FieldNameProvider fieldNameProvider)-
Methods inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractPropertyFieldValueProvider
getRangeNameList, getRangeNameList, setI18nService, setLocaleService, setModelService, setRangeNameProvider
-
-
-
-
Method Detail
-
getFieldNameProvider
protected FieldNameProvider getFieldNameProvider()
-
setFieldNameProvider
public void setFieldNameProvider(FieldNameProvider fieldNameProvider)
-
getCommerceStockService
protected CommerceStockService getCommerceStockService()
-
setCommerceStockService
public void setCommerceStockService(CommerceStockService commerceStockService)
-
getFieldValues
public java.util.Collection<FieldValue> getFieldValues(IndexConfig indexConfig, IndexedProperty indexedProperty, java.lang.Object model) throws FieldValueProviderException
Description copied from interface:FieldValueProviderReturns a collection ofFieldValueof a given indexedProperty that are fetched from the model based on the indexConfig. Supports multi-language and multi-currencies.- Specified by:
getFieldValuesin interfaceFieldValueProvider- Returns:
- Collection<
FieldValue> - Throws:
FieldValueProviderException
-
createFieldValue
protected java.util.List<FieldValue> createFieldValue(ProductModel product, BaseStoreModel baseStore, IndexedProperty indexedProperty)
-
addFieldValues
protected void addFieldValues(java.util.List<FieldValue> fieldValues, IndexedProperty indexedProperty, java.lang.Object value)
-
getProductStockLevelStatus
protected StockLevelStatus getProductStockLevelStatus(ProductModel product, BaseStoreModel baseStore)
-
-