Class MockupIndexTypeValuesProvider
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.provider.impl.MockupIndexTypeValuesProvider
-
- All Implemented Interfaces:
IndexedTypeFieldsValuesProvider
public class MockupIndexTypeValuesProvider extends java.lang.Object implements IndexedTypeFieldsValuesProvider
This is a mockup implementation of IndexedTypeFieldsValuesProvider: adds additional field: name 'arbitraryField1', value 'TOP' if product belongs to supercategory. Implementer ofIndexedTypeFieldsValuesProvider
must be aware of the solr indexer field naming conventions.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
for an arbitraty field name, the name must be postfixed eith "_TYPE", where TYPE is a solr field type.static java.lang.String
TARGET_SUPER_CATEGORY
-
Constructor Summary
Constructors Constructor Description MockupIndexTypeValuesProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>
getFacets()
Returns set of facets names that are provided.java.util.Map<java.lang.String,java.lang.String>
getFieldNamesMapping()
Returns field to index field names mapping for the properties provided.java.util.Collection<FieldValue>
getFieldValues(IndexConfig indexConfig, java.lang.Object model)
Returns a collection ofFieldValue
of a given model that are fetched from it based on the indexConfig and customized implemented logic.void
setModelService(ModelService modelService)
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
for an arbitraty field name, the name must be postfixed eith "_TYPE", where TYPE is a solr field type.- See Also:
- Constant Field Values
-
TARGET_SUPER_CATEGORY
public static final java.lang.String TARGET_SUPER_CATEGORY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFieldValues
public java.util.Collection<FieldValue> getFieldValues(IndexConfig indexConfig, java.lang.Object model) throws FieldValueProviderException
Description copied from interface:IndexedTypeFieldsValuesProvider
Returns a collection ofFieldValue
of a given model that are fetched from it based on the indexConfig and customized implemented logic. Supports multi-language and multi-currencies.- Specified by:
getFieldValues
in interfaceIndexedTypeFieldsValuesProvider
- Returns:
- Collection<
FieldValue
> - Throws:
FieldValueProviderException
-
setModelService
public void setModelService(ModelService modelService)
- Parameters:
modelService
- the modelService to set
-
getFacets
public java.util.Set<java.lang.String> getFacets()
Description copied from interface:IndexedTypeFieldsValuesProvider
Returns set of facets names that are provided.- Specified by:
getFacets
in interfaceIndexedTypeFieldsValuesProvider
- Returns:
- Set
-
getFieldNamesMapping
public java.util.Map<java.lang.String,java.lang.String> getFieldNamesMapping()
Description copied from interface:IndexedTypeFieldsValuesProvider
Returns field to index field names mapping for the properties provided.- Specified by:
getFieldNamesMapping
in interfaceIndexedTypeFieldsValuesProvider
- Returns:
- Map
-
-