Class AbstractMultidimensionalProductFieldValueProvider
java.lang.Object
de.hybris.platform.solrfacetsearch.provider.impl.AbstractPropertyFieldValueProvider
de.hybris.platform.commerceservices.search.solrfacetsearch.provider.AbstractMultidimensionalProductFieldValueProvider
- All Implemented Interfaces:
FieldValueProvider
- Direct Known Subclasses:
FirstGenericVariantProductUrlValueProvider,FirstVariantCategoryNameListValueProvider,MultidimentionalProductFlagValueProvider,ProductPriceRangeValueProvider
public abstract class AbstractMultidimensionalProductFieldValueProvider
extends AbstractPropertyFieldValueProvider
implements FieldValueProvider
Utility class for the Product Value Providers.
-
Field Summary
Fields inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractPropertyFieldValueProvider
i18nService, localeService, modelService, rangeNameProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFieldValues(List<FieldValue> fieldValues, IndexedProperty indexedProperty, Object value) Add a value in the list of field values.getBaseProduct(ProductModel model) For a given product, retrieve its base product.protected FieldNameProviderprotected abstract ObjectgetFieldValue(ProductModel product) getFieldValues(IndexConfig indexConfig, IndexedProperty indexedProperty, Object model) Returns a collection ofFieldValueof a given indexedProperty that are fetched from the model based on the indexConfig.booleanisVariantBaseProduct(ProductModel model) For a given product, finds out if it is a base product ofGenericVariantProductModelproducts.voidsetFieldNameProvider(FieldNameProvider fieldNameProvider) Methods inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractPropertyFieldValueProvider
getRangeNameList, getRangeNameList, setI18nService, setLocaleService, setModelService, setRangeNameProvider
-
Constructor Details
-
AbstractMultidimensionalProductFieldValueProvider
public AbstractMultidimensionalProductFieldValueProvider()
-
-
Method Details
-
getFieldValue
-
getFieldValues
public Collection<FieldValue> getFieldValues(IndexConfig indexConfig, IndexedProperty indexedProperty, 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
-
addFieldValues
protected void addFieldValues(List<FieldValue> fieldValues, IndexedProperty indexedProperty, Object value) Add a value in the list of field values. It will add one entry for eachFieldValuerelated to the given Solr property.- Parameters:
fieldValues- The list of field values.indexedProperty- The property used on Solr.value- The value to be added.
-
getBaseProduct
For a given product, retrieve its base product.- Parameters:
model- The product.- Returns:
- The base product, if it is a variant product, or the model, if it is already the base product or is not a variant product.
-
isVariantBaseProduct
For a given product, finds out if it is a base product ofGenericVariantProductModelproducts.- Parameters:
model- The product.- Returns:
- True if it is a base product that has generic variants.
-
getFieldNameProvider
-
setFieldNameProvider
-