Interface CategoryDetailsContributor

All Superinterfaces:
org.springframework.core.Ordered
All Known Implementing Classes:
BreadcrumbsCategoryDetailsContributor, CategoryAssetsCategoryDetailsContributor, ProductsCategoryDetailsContributor, RelatedPromotionalProductsCategoryDetailsContributor

public interface CategoryDetailsContributor extends org.springframework.core.Ordered
Responsible for contributing a specific subset of information to a CategoryDetails based on a CategoryDetailsContext such as contributing the assets or contributing the breadcrumbs. It is desirable for implementations of this class to be as narrow as possible in the breadth of their contributions to improve extensibility, reusability, testability, and readability.
Author:
Nathan Moore (nathandmoore)
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    contribute(CategoryDetails categoryDetails, CategoryDetailsContext categoryDetailsContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Contributes to the supplied CategoryDetails.

    Methods inherited from interface org.springframework.core.Ordered

    getOrder
  • Method Details

    • contribute

      CategoryDetails contribute(CategoryDetails categoryDetails, CategoryDetailsContext categoryDetailsContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Contributes to the supplied CategoryDetails. This should not mutate the inputted details, but return a new one with the new contributions.
      Parameters:
      categoryDetails - The details to which to contribute
      categoryDetailsContext - The context containing information that may be important for contributors.
      contextInfo - context information surrounding sandboxing/multitenant state
      Returns:
      An version of the supplied CategoryDetails with the new contributions.