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
ConstructorsConstructorDescriptionRatingsReviewsEntityContributor(RatingsReviewProvider ratingsReviewProvider, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(@NonNull Class<?> entityType, @NonNull DataFeedCollectionRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Indicates if thisCollectedEntityContributorcan handle the given batch of collected entities.voidcontribute(@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.ObjectMapperprotected RatingsReviewProviderprotected com.broadleafcommerce.common.extension.TypeFactoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:CollectedEntityContributorIndicates if thisCollectedEntityContributorcan handle the given batch of collected entities.- Specified by:
canHandlein 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:CollectedEntityContributorHook 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:
contributein 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()
-