Class ProductPromotionAttributesValueResolver
java.lang.Object
de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver<ProductModel,Collection<ProductPromotionModel>,Object>
de.hybris.platform.commerceservices.search.solrfacetsearch.provider.impl.ProductPromotionAttributesValueResolver
- All Implemented Interfaces:
QualifierProviderAware,ValueResolver<ProductModel>
public class ProductPromotionAttributesValueResolver
extends AbstractValueResolver<ProductModel,Collection<ProductPromotionModel>,Object>
Resolver that gets the product promotion values from attributes on the promotion model. By default, if parameter attribute is
not
specified, it
tries to get the attribute with the same name as the one configured on the indexed property.
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.attribute If specified, this is the name of the attribute. evaluateExpression false If true the attribute name is assumed to be a spring expression language that need to be evaluated
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver
AbstractValueResolver.ValueResolverContext<T,U> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFieldValues(InputDocument document, IndexerBatchContext batchContext, IndexedProperty indexedProperty, ProductModel model, AbstractValueResolver.ValueResolverContext<Collection<ProductPromotionModel>, Object> resolverContext) protected StringgetAttributeName(IndexedProperty indexedProperty) protected ObjectgetAttributeValue(IndexedProperty indexedProperty, IndexerBatchContext batchContext, ProductPromotionModel promotionModel, String attributeName) protected Collection<ProductPromotionModel>loadData(IndexerBatchContext batchContext, Collection<IndexedProperty> indexedProperties, ProductModel model) Loads data that is valid in the context of a model.voidsetExpressionEvaluator(ExpressionEvaluator expressionEvaluator) voidsetModelService(ModelService modelService) voidsetPromotionsService(PromotionsService promotionsService) voidsetTypeService(TypeService typeService) 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 Details
-
OPTIONAL_PARAM
- See Also:
-
OPTIONAL_PARAM_DEFAULT_VALUE
public static final boolean OPTIONAL_PARAM_DEFAULT_VALUE- See Also:
-
ATTRIBUTE_PARAM
- See Also:
-
ATTRIBUTE_PARAM_DEFAULT_VALUE
-
EVALUATE_EXPRESSION_PARAM
- See Also:
-
EVALUATE_EXPRESSION_PARAM_DEFAULT_VALUE
public static final boolean EVALUATE_EXPRESSION_PARAM_DEFAULT_VALUE- See Also:
-
-
Constructor Details
-
ProductPromotionAttributesValueResolver
public ProductPromotionAttributesValueResolver()
-
-
Method Details
-
getPromotionsService
-
setPromotionsService
-
getExpressionEvaluator
-
setExpressionEvaluator
-
getTypeService
-
setTypeService
-
getModelService
-
setModelService
-
addFieldValues
protected void addFieldValues(InputDocument document, IndexerBatchContext batchContext, IndexedProperty indexedProperty, ProductModel model, AbstractValueResolver.ValueResolverContext<Collection<ProductPromotionModel>, Object> resolverContext) throws FieldValueProviderException- Specified by:
addFieldValuesin classAbstractValueResolver<ProductModel,Collection<ProductPromotionModel>, Object> - Throws:
FieldValueProviderException
-
getAttributeName
-
getAttributeValue
protected Object getAttributeValue(IndexedProperty indexedProperty, IndexerBatchContext batchContext, ProductPromotionModel promotionModel, String attributeName) throws FieldValueProviderException - Throws:
FieldValueProviderException
-
loadData
protected Collection<ProductPromotionModel> loadData(IndexerBatchContext batchContext, Collection<IndexedProperty> indexedProperties, ProductModel model) throws FieldValueProviderException Description copied from class:AbstractValueResolverLoads data that is valid in the context of a model.- Overrides:
loadDatain classAbstractValueResolver<ProductModel,Collection<ProductPromotionModel>, Object> - Parameters:
batchContext- - the current indexer batch contextindexedProperties- - the indexed properties that use the same value resolvermodel- - the values should be resolved for this model instance- Throws:
FieldValueProviderException- if an error occurs
-