Class BaseStructuredArticleComponentValueResolver
- java.lang.Object
-
- com.sap.retail.commercesuite.saparticlesearch.provider.BaseStructuredArticleComponentValueResolver
-
- All Implemented Interfaces:
de.hybris.platform.solrfacetsearch.provider.ValueResolver<ProductModel>
- Direct Known Subclasses:
StructuredArticleComponentKeywordsValueResolver,StructuredArticleComponentNamesValueResolver
public abstract class BaseStructuredArticleComponentValueResolver extends java.lang.Object implements de.hybris.platform.solrfacetsearch.provider.ValueResolver<ProductModel>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringOPTIONAL_PARAMOptional parameter.static booleanOPTIONAL_PARAM_DEFAULT_VALUEOptional parameter default value.static java.lang.StringSEPARATOR_PARAMSeparator parameter.static java.lang.StringSEPARATOR_PARAM_DEFAULT_VALUESeparator parameter default value.static java.lang.StringSPLIT_PARAMSplit parameter.static booleanSPLIT_PARAM_DEFAULT_VALUESplit parameter default value.
-
Constructor Summary
Constructors Constructor Description BaseStructuredArticleComponentValueResolver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddFieldValues(de.hybris.platform.solrfacetsearch.indexer.spi.InputDocument document, IndexedProperty indexedProperty, ProductModel product, LanguageModel language)Adds the field value depending from the configuration (multivalue, localized).protected de.hybris.platform.servicelayer.i18n.CommonI18NServicegetCommonI18NService()Returns theCommonI18NService.protected abstract java.lang.ObjectgetComponentPropertyValue(ArticleComponentModel articleComponent, LanguageModel language)Gets the property value of the article component.protected java.util.List<java.lang.Object>getComponentPropertyValues(ProductModel product, LanguageModel language, java.lang.String separator)Returns the values of the requested article component properties.protected java.lang.StringgetComponentPropertyValuesAsString(ProductModel product, LanguageModel language, java.lang.String separator)Returns the values of the requested article component properties as string.protected abstract org.apache.log4j.LoggergetLogger()Gets the logger of the current implementation class.voidresolve(de.hybris.platform.solrfacetsearch.indexer.spi.InputDocument document, de.hybris.platform.solrfacetsearch.indexer.IndexerBatchContext batchContext, java.util.Collection<IndexedProperty> indexedProperties, ProductModel model)voidsetCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService)Injection setter forCommonI18NService.
-
-
-
Field Detail
-
OPTIONAL_PARAM
public static final java.lang.String OPTIONAL_PARAM
Optional parameter.- See Also:
- Constant Field Values
-
OPTIONAL_PARAM_DEFAULT_VALUE
public static final boolean OPTIONAL_PARAM_DEFAULT_VALUE
Optional parameter default value.- See Also:
- Constant Field Values
-
SPLIT_PARAM
public static final java.lang.String SPLIT_PARAM
Split parameter.- See Also:
- Constant Field Values
-
SPLIT_PARAM_DEFAULT_VALUE
public static final boolean SPLIT_PARAM_DEFAULT_VALUE
Split parameter default value.- See Also:
- Constant Field Values
-
SEPARATOR_PARAM
public static final java.lang.String SEPARATOR_PARAM
Separator parameter.- See Also:
- Constant Field Values
-
SEPARATOR_PARAM_DEFAULT_VALUE
public static final java.lang.String SEPARATOR_PARAM_DEFAULT_VALUE
Separator parameter default value.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCommonI18NService
protected de.hybris.platform.servicelayer.i18n.CommonI18NService getCommonI18NService()
Returns theCommonI18NService.- Returns:
CommonI18NService
-
setCommonI18NService
public void setCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService)
Injection setter forCommonI18NService.- Parameters:
commonI18NService-CommonI18NService
-
resolve
public void resolve(de.hybris.platform.solrfacetsearch.indexer.spi.InputDocument document, de.hybris.platform.solrfacetsearch.indexer.IndexerBatchContext batchContext, java.util.Collection<IndexedProperty> indexedProperties, ProductModel model) throws de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException- Specified by:
resolvein interfacede.hybris.platform.solrfacetsearch.provider.ValueResolver<ProductModel>- Throws:
de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException
-
addFieldValues
protected void addFieldValues(de.hybris.platform.solrfacetsearch.indexer.spi.InputDocument document, IndexedProperty indexedProperty, ProductModel product, LanguageModel language) throws de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderExceptionAdds the field value depending from the configuration (multivalue, localized).- Parameters:
document- solr document to be enhancedindexedProperty- indexed propertyproduct- product modellanguage- language- Throws:
de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException- exception if field value cannot be provided
-
getComponentPropertyValuesAsString
protected java.lang.String getComponentPropertyValuesAsString(ProductModel product, LanguageModel language, java.lang.String separator)
Returns the values of the requested article component properties as string.- Parameters:
product- product modellanguage- languageseparator- value separator- Returns:
- component property values as string
-
getComponentPropertyValues
protected java.util.List<java.lang.Object> getComponentPropertyValues(ProductModel product, LanguageModel language, java.lang.String separator)
Returns the values of the requested article component properties.- Parameters:
product- product modellanguage- languageseparator- value separator- Returns:
- component property values as string
-
getComponentPropertyValue
protected abstract java.lang.Object getComponentPropertyValue(ArticleComponentModel articleComponent, LanguageModel language)
Gets the property value of the article component.- Parameters:
articleComponent- article component modellanguage- language model- Returns:
- property value
-
getLogger
protected abstract org.apache.log4j.Logger getLogger()
Gets the logger of the current implementation class.- Returns:
- logger
-
-