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 void
addFieldValues(java.util.List<FieldValue> fieldValues, IndexedProperty indexedProperty, java.lang.Object value)
Add a value in the list of field values.ProductModel
getBaseProduct(ProductModel model)
For a given product, retrieve its base product.protected FieldNameProvider
getFieldNameProvider()
protected abstract java.lang.Object
getFieldValue(ProductModel product)
java.util.Collection<FieldValue>
getFieldValues(IndexConfig indexConfig, IndexedProperty indexedProperty, java.lang.Object model)
Returns a collection ofFieldValue
of a given indexedProperty that are fetched from the model based on the indexConfig.boolean
isVariantBaseProduct(ProductModel model)
For a given product, finds out if it is a base product ofGenericVariantProductModel
products.void
setFieldNameProvider(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:FieldValueProvider
Returns a collection ofFieldValue
of a given indexedProperty that are fetched from the model based on the indexConfig. Supports multi-language and multi-currencies.- Specified by:
getFieldValues
in 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 eachFieldValue
related 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 ofGenericVariantProductModel
products.- 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)
-
-