Class RatingsReviewsEntityContributor

java.lang.Object
com.broadleafcommerce.datafeed.service.collector.product.RatingsReviewsEntityContributor
All Implemented Interfaces:
CollectedEntityContributor, org.springframework.core.Ordered

public class RatingsReviewsEntityContributor extends Object implements CollectedEntityContributor
Contributes Pricing data to the Products that are collected for a Data Feed.
Author:
Kelly Tisdell (ktisdell)
  • 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 this CollectedEntityContributor can handle the given batch of collected entities.
      Specified by:
      canHandle in interface CollectedEntityContributor
      Parameters:
      entityType - the class that represents the batch of items to receive contributions
      request - the original request
      contextInfo - 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 interface CollectedEntityContributor
      Parameters:
      entities - the List of entities that may require contributions
      request - the original request
      processState - A Map of shared context for storing details of the collection process - expected to be thread-safe
      contextInfo - the context info associated with this process
    • getRatingsReviewProvider

      protected RatingsReviewProvider getRatingsReviewProvider()
    • getObjectMapper

      protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()