Class DocumentsResourceSnIndexerValueProvider
- java.lang.Object
-
- de.hybris.platform.searchservices.indexer.service.impl.DocumentsResourceSnIndexerValueProvider
-
- All Implemented Interfaces:
SnIndexerValueProvider<ItemModel>
public class DocumentsResourceSnIndexerValueProvider extends java.lang.Object implements SnIndexerValueProvider<ItemModel>
Implementation forSnIndexerValueProviderthat can extract values from a documents resource.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringIDstatic java.lang.StringRESOURCE_PARAMprotected static java.util.Set<java.lang.Class<?>>SUPPORTED_QUALIFIER_CLASSES
-
Constructor Summary
Constructors Constructor Description DocumentsResourceSnIndexerValueProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,SnDocument>doLoadResource(java.lang.String resource)protected java.util.Optional<SnDocument>extractDocument(java.util.Map<java.lang.String,SnDocument> documents, SnDocument target)protected java.lang.ObjectextractDocumentValue(SnDocument document, SnIndexerFieldWrapper fieldWrapper)java.util.Set<java.lang.Class<?>>getSupportedQualifierClasses()Returns the supported qualifier classes.protected java.util.Map<java.lang.String,SnDocument>loadResource(SnIndexerFieldWrapper fieldWrapper)voidprovide(SnIndexerContext indexerContext, java.util.Collection<SnIndexerFieldWrapper> fieldWrappers, ItemModel source, SnDocument target)Populates the document with values to be indexed.
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
RESOURCE_PARAM
public static final java.lang.String RESOURCE_PARAM
- See Also:
- Constant Field Values
-
SUPPORTED_QUALIFIER_CLASSES
protected static final java.util.Set<java.lang.Class<?>> SUPPORTED_QUALIFIER_CLASSES
-
-
Method Detail
-
getSupportedQualifierClasses
public java.util.Set<java.lang.Class<?>> getSupportedQualifierClasses() throws SnIndexerExceptionDescription 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, java.util.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
protected java.util.Map<java.lang.String,SnDocument> loadResource(SnIndexerFieldWrapper fieldWrapper)
-
doLoadResource
protected java.util.Map<java.lang.String,SnDocument> doLoadResource(java.lang.String resource)
-
extractDocument
protected java.util.Optional<SnDocument> extractDocument(java.util.Map<java.lang.String,SnDocument> documents, SnDocument target)
-
extractDocumentValue
protected java.lang.Object extractDocumentValue(SnDocument document, SnIndexerFieldWrapper fieldWrapper)
-
-