Class ProductClassificationAttributesValueResolver
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver<ProductModel,FeatureList,java.lang.Object>
-
- de.hybris.platform.commerceservices.search.solrfacetsearch.provider.impl.ProductClassificationAttributesValueResolver
-
- All Implemented Interfaces:
QualifierProviderAware,ValueResolver<ProductModel>
public class ProductClassificationAttributesValueResolver extends AbstractValueResolver<ProductModel,FeatureList,java.lang.Object>
Resolver for product classification attributes.Supported parameters:
Parameter Default value Description optional true If false, indicates that the resolved values should not be null and not an empty string (for every qualifier). If these conditions are not met, an exception of type FieldValueProviderExceptionis thrown.split false If true, splits any resolved value around matches of a regular expression (only if the value is of type String). splitRegex \s+ If split is true this is the regular expression to use. format null The ID of the Format Bean that is going to be used to format the attribute value object before applying the split
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver
AbstractValueResolver.ValueResolverContext<T,U>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringOPTIONAL_PARAMstatic booleanOPTIONAL_PARAM_DEFAULT_VALUE
-
Constructor Summary
Constructors Constructor Description ProductClassificationAttributesValueResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddFieldValues(InputDocument document, IndexerBatchContext batchContext, IndexedProperty indexedProperty, ProductModel model, AbstractValueResolver.ValueResolverContext<FeatureList,java.lang.Object> resolverContext)ClassificationServicegetClassificationService()protected FeaturegetFeature(IndexedProperty indexedProperty, FeatureList featureList)protected java.util.List<FeatureValue>getFeatureValues(Feature feature, Qualifier qualifier)protected FeatureListloadData(IndexerBatchContext batchContext, java.util.Collection<IndexedProperty> indexedProperties, ProductModel product)Loads data that is valid in the context of a model.protected FeatureListloadFeatures(java.util.Collection<IndexedProperty> indexedProperties, ProductModel productModel)voidsetClassificationService(ClassificationService classificationService)-
Methods inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver
addFieldValue, createLocalSessionContext, doResolve, filterAndAddFieldValues, filterFieldValue, getQualifierProvider, getSessionService, getValueFilters, loadQualifierData, removeLocalSessionContext, resolve, setQualifierProvider, setSessionService, setValueFilters
-
-
-
-
Field Detail
-
OPTIONAL_PARAM
public static final java.lang.String OPTIONAL_PARAM
- See Also:
- Constant Field Values
-
OPTIONAL_PARAM_DEFAULT_VALUE
public static final boolean OPTIONAL_PARAM_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getClassificationService
public ClassificationService getClassificationService()
-
setClassificationService
public void setClassificationService(ClassificationService classificationService)
-
loadData
protected FeatureList loadData(IndexerBatchContext batchContext, java.util.Collection<IndexedProperty> indexedProperties, ProductModel product)
Description copied from class:AbstractValueResolverLoads data that is valid in the context of a model.- Overrides:
loadDatain classAbstractValueResolver<ProductModel,FeatureList,java.lang.Object>- Parameters:
batchContext- - the current indexer batch contextindexedProperties- - the indexed properties that use the same value resolverproduct- - the values should be resolved for this model instance
-
addFieldValues
protected void addFieldValues(InputDocument document, IndexerBatchContext batchContext, IndexedProperty indexedProperty, ProductModel model, AbstractValueResolver.ValueResolverContext<FeatureList,java.lang.Object> resolverContext) throws FieldValueProviderException
- Specified by:
addFieldValuesin classAbstractValueResolver<ProductModel,FeatureList,java.lang.Object>- Throws:
FieldValueProviderException
-
loadFeatures
protected FeatureList loadFeatures(java.util.Collection<IndexedProperty> indexedProperties, ProductModel productModel)
-
getFeature
protected Feature getFeature(IndexedProperty indexedProperty, FeatureList featureList)
-
getFeatureValues
protected java.util.List<FeatureValue> getFeatureValues(Feature feature, Qualifier qualifier) throws FieldValueProviderException
- Throws:
FieldValueProviderException
-
-