Class RelatedProductTagsCategoryContextContributor
java.lang.Object
com.broadleafcommerce.catalog.service.category.commerce.context.contributor.RelatedProductTagsCategoryContextContributor
- All Implemented Interfaces:
CategoryDetailsContextContributor
,org.springframework.core.Ordered
public class RelatedProductTagsCategoryContextContributor
extends Object
implements CategoryDetailsContextContributor
Contributes all of the related
ProductTags
to the
CategoryDetailsContext
.- Author:
- Nathan Moore (nathandmoore)
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionRelatedProductTagsCategoryContextContributor
(ProductTagService<ProductTag> productTagService, AdvancedTagService<AdvancedTag> advancedTagService) -
Method Summary
Modifier and TypeMethodDescriptioncontribute
(@NonNull CategoryDetailsContext categoryDetailsContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Contributes to the suppliedCategoryDetailsContext
.protected AdvancedTagService<AdvancedTag>
int
getOrder()
protected ProductTagService<ProductTag>
-
Field Details
-
DEFAULT_ORDER
public static final int DEFAULT_ORDER- See Also:
-
-
Constructor Details
-
RelatedProductTagsCategoryContextContributor
public RelatedProductTagsCategoryContextContributor(ProductTagService<ProductTag> productTagService, AdvancedTagService<AdvancedTag> advancedTagService)
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
contribute
public CategoryDetailsContext contribute(@NonNull @NonNull CategoryDetailsContext categoryDetailsContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CategoryDetailsContextContributor
Contributes to the suppliedCategoryDetailsContext
. This should not mutate the inputted context, but return a new one with the new contributions.- Specified by:
contribute
in interfaceCategoryDetailsContextContributor
- Parameters:
categoryDetailsContext
- The context to which to contributecontextInfo
- context information surrounding sandboxing/multitenant state- Returns:
- A version of the supplied
CategoryDetailsContext
with the new contributions.
-
getProductTagService
-
getAdvancedTagService
-