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 Constructor Description AbstractMultidimensionalProductFieldValueProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddFieldValues(java.util.List<FieldValue> fieldValues, IndexedProperty indexedProperty, java.lang.Object value)Add a value in the list of field values.ProductModelgetBaseProduct(ProductModel model)For a given product, retrieve its base product.protected FieldNameProvidergetFieldNameProvider()protected abstract java.lang.ObjectgetFieldValue(ProductModel product)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.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
-
-
-
-
Method Detail
-
getFieldValue
protected abstract java.lang.Object getFieldValue(ProductModel product)
-
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
-
addFieldValues
protected void addFieldValues(java.util.List<FieldValue> fieldValues, IndexedProperty indexedProperty, java.lang.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
public ProductModel getBaseProduct(ProductModel model)
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
public boolean isVariantBaseProduct(ProductModel model)
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
protected FieldNameProvider getFieldNameProvider()
-
setFieldNameProvider
public void setFieldNameProvider(FieldNameProvider fieldNameProvider)
-
-