Class RelatedCategoryAssetsCategoryContextContributor
java.lang.Object
com.broadleafcommerce.catalog.service.category.commerce.context.contributor.RelatedCategoryAssetsCategoryContextContributor
- All Implemented Interfaces:
CategoryDetailsContextContributor
,org.springframework.core.Ordered
public class RelatedCategoryAssetsCategoryContextContributor
extends Object
implements CategoryDetailsContextContributor
Contributes all of the related
CategoryAssets
to the
CategoryDetailsContext
.- Author:
- Nathan Moore (nathandmoore)
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionRelatedCategoryAssetsCategoryContextContributor
(CategoryAssetService<CategoryAsset> categoryAssetService) -
Method Summary
Modifier and TypeMethodDescriptioncontribute
(@NonNull CategoryDetailsContext categoryDetailsContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Contributes to the suppliedCategoryDetailsContext
.protected CategoryAssetService<CategoryAsset>
int
getOrder()
-
Field Details
-
DEFAULT_ORDER
public static final int DEFAULT_ORDER- See Also:
-
-
Constructor Details
-
RelatedCategoryAssetsCategoryContextContributor
public RelatedCategoryAssetsCategoryContextContributor(CategoryAssetService<CategoryAsset> categoryAssetService)
-
-
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.
-
getCategoryAssetService
-