Class DocumentsResourceSnIndexerValueProvider
java.lang.Object
de.hybris.platform.searchservices.indexer.service.impl.DocumentsResourceSnIndexerValueProvider
- All Implemented Interfaces:
SnIndexerValueProvider<ItemModel>
public class DocumentsResourceSnIndexerValueProvider
extends Object
implements SnIndexerValueProvider<ItemModel>
Implementation for
SnIndexerValueProvider that can extract values from a documents resource.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<String,SnDocument> doLoadResource(String resource) protected Optional<SnDocument>extractDocument(Map<String, SnDocument> documents, SnDocument target) protected ObjectextractDocumentValue(SnDocument document, SnIndexerFieldWrapper fieldWrapper) Returns the supported qualifier classes.protected Map<String,SnDocument> loadResource(SnIndexerFieldWrapper fieldWrapper) voidprovide(SnIndexerContext indexerContext, Collection<SnIndexerFieldWrapper> fieldWrappers, ItemModel source, SnDocument target) Populates the document with values to be indexed.
-
Field Details
-
ID
- See Also:
-
RESOURCE_PARAM
- See Also:
-
SUPPORTED_QUALIFIER_CLASSES
-
-
Constructor Details
-
DocumentsResourceSnIndexerValueProvider
public DocumentsResourceSnIndexerValueProvider()
-
-
Method Details
-
getSupportedQualifierClasses
Description copied from interface:SnIndexerValueProviderReturns the supported qualifier classes.- Specified by:
getSupportedQualifierClassesin interfaceSnIndexerValueProvider<ItemModel>- Returns:
- the supported qualifier classes
- Throws:
SnIndexerException
-
provide
public void provide(SnIndexerContext indexerContext, Collection<SnIndexerFieldWrapper> fieldWrappers, ItemModel source, SnDocument target) throws SnIndexerException Description copied from interface:SnIndexerValueProviderPopulates the document with values to be indexed. The fields that use the same value resolver are grouped and this method is called once for each one of these groups.- Specified by:
providein interfaceSnIndexerValueProvider<ItemModel>- Parameters:
indexerContext- - the indexer contextfieldWrappers- - the field wrapperssource- - the source modeltarget- - the target document- Throws:
SnIndexerException- if an error occurs
-
loadResource
-
doLoadResource
-
extractDocument
-
extractDocumentValue
-