Interface CollectedEntityContributor
- All Superinterfaces:
- org.springframework.core.Ordered
- All Known Implementing Classes:
- InventoryEntityContributor,- PricingEntityContributor,- RatingsReviewsEntityContributor
public interface CollectedEntityContributor
extends org.springframework.core.Ordered
Components to allow implementors to decorate additional data on 
CollectedEntities. For example, we might fetch products from the CatalogService, but those
 products may need to be additionally decorated with inventory details, dynamic pricing details,
 ratings and reviews, etc.
 Data is received in batches which makes batch querying easier.- Author:
- Kelly Tisdell (ktisdell)
- 
Field SummaryFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Method SummaryModifier 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.default intgetOrder()
- 
Method Details- 
canHandleboolean canHandle(@NonNull @NonNull Class<?> entityType, @NonNull @NonNull DataFeedCollectionRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Indicates if thisCollectedEntityContributorcan handle the given batch of collected entities.- 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:
 
- 
contributevoid 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) 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.- 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
 
- 
getOrderdefault int getOrder()- Specified by:
- getOrderin interface- org.springframework.core.Ordered
 
 
-