Class RatingsReviewsEntityContributor
java.lang.Object
com.broadleafcommerce.datafeed.service.collector.product.RatingsReviewsEntityContributor
- All Implemented Interfaces:
CollectedEntityContributor
,org.springframework.core.Ordered
Contributes Pricing data to the Products that are collected for a Data Feed.
- Author:
- Kelly Tisdell (ktisdell)
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionRatingsReviewsEntityContributor
(RatingsReviewProvider ratingsReviewProvider, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canHandle
(@NonNull Class<?> entityType, @NonNull DataFeedCollectionRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Indicates if thisCollectedEntityContributor
can handle the given batch of collected entities.void
contribute
(@NonNull List<? extends CollectedEntity<?>> entities, @NonNull DataFeedCollectionRequest request, @NonNull Map<String, Object> processState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Hook point to allow the augmentation or decoration of a batch of entities that have been fetched, but that may need additional data from other sources.protected com.fasterxml.jackson.databind.ObjectMapper
protected RatingsReviewProvider
protected com.broadleafcommerce.common.extension.TypeFactory
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.datafeed.service.collector.CollectedEntityContributor
getOrder
-
Constructor Details
-
RatingsReviewsEntityContributor
public RatingsReviewsEntityContributor(RatingsReviewProvider ratingsReviewProvider, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
canHandle
public boolean canHandle(@NonNull @NonNull Class<?> entityType, @NonNull @NonNull DataFeedCollectionRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CollectedEntityContributor
Indicates if thisCollectedEntityContributor
can handle the given batch of collected entities.- Specified by:
canHandle
in interfaceCollectedEntityContributor
- Parameters:
entityType
- the class that represents the batch of items to receive contributionsrequest
- the original requestcontextInfo
- the context info associated with this process- Returns:
-
contribute
public void contribute(@NonNull @NonNull List<? extends CollectedEntity<?>> entities, @NonNull @NonNull DataFeedCollectionRequest request, @NonNull @NonNull Map<String, Object> processState, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CollectedEntityContributor
Hook point to allow the augmentation or decoration of a batch of entities that have been fetched, but that may need additional data from other sources.- Specified by:
contribute
in interfaceCollectedEntityContributor
- Parameters:
entities
- the List of entities that may require contributionsrequest
- the original requestprocessState
- A Map of shared context for storing details of the collection process - expected to be thread-safecontextInfo
- the context info associated with this process
-
getRatingsReviewProvider
-
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-