Class CategoryDetailsContext
- All Implemented Interfaces:
Serializable
CategoryDetails
for a commerce-facing category details page
or section. This contains important context information for determining which category to gather
details for and, potentially, the extent of the details.- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
ConstructorDescriptionCategoryDetailsContext
(CategoryDetailsRequest request, Category resolvedCategory, Map<String, List<CategoryAsset>> relatedCategoryAssets, Map<String, org.springframework.data.domain.Page<ProductSummary>> relatedCategoryProducts, org.springframework.data.domain.Page<ProductSummary> relatedRuleBasedProducts, Map<String, ProductSummary> relatedProducts, Map<String, List<ProductAsset>> relatedProductAssets, Map<String, VariantDetail> relatedVariants, Map<String, List<PromotionalCategoryProductSummary>> relatedPromotionalProducts, Map<String, List<ProductTag>> relatedProductTags) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
org.springframework.data.domain.Pageable
An aggregation of all of theCategoryAssets
related to theresolvedCategory
.Map<String,
org.springframework.data.domain.Page<ProductSummary>> An aggregation of all of theProducts
related to theresolvedCategory
.An aggregation of all of theProductAssets
related to therelatedProducts
.An aggregation of all of theProducts
related to theresolvedCategory
.Map of allProductTags
of therelatedProducts
.An aggregation of all of thePromotionalProducts
related to theresolvedCategory
mapped by theirtype
.org.springframework.data.domain.Page<ProductSummary>
An aggregation of all of theProducts
related to theresolvedCategory
when it isCategoryProductMembershipType.RULE_BASED
.An aggregation of all of theVariants
related to therelatedProducts
.TheCategoryDetailsRequest
made that initiated theCategoryDetails
build process.The resolved category for therequest
.int
hashCode()
void
setAttributes
(org.springframework.util.MultiValueMap<String, String> attributes) void
setCategoryId
(String categoryId) void
setCategoryUrl
(String categoryUrl) void
setProductPageInfo
(org.springframework.data.domain.Pageable productPageInfo) void
setRelatedCategoryAssets
(Map<String, List<CategoryAsset>> relatedCategoryAssets) An aggregation of all of theCategoryAssets
related to theresolvedCategory
.void
setRelatedCategoryProducts
(Map<String, org.springframework.data.domain.Page<ProductSummary>> relatedCategoryProducts) An aggregation of all of theProducts
related to theresolvedCategory
.void
setRelatedProductAssets
(Map<String, List<ProductAsset>> relatedProductAssets) An aggregation of all of theProductAssets
related to therelatedProducts
.void
setRelatedProducts
(Map<String, ProductSummary> relatedProducts) An aggregation of all of theProducts
related to theresolvedCategory
.void
setRelatedProductTags
(Map<String, List<ProductTag>> relatedProductTags) Map of allProductTags
of therelatedProducts
.void
setRelatedPromotionalProducts
(Map<String, List<PromotionalCategoryProductSummary>> relatedPromotionalProducts) An aggregation of all of thePromotionalProducts
related to theresolvedCategory
mapped by theirtype
.void
setRelatedRuleBasedProducts
(org.springframework.data.domain.Page<ProductSummary> relatedRuleBasedProducts) An aggregation of all of theProducts
related to theresolvedCategory
when it isCategoryProductMembershipType.RULE_BASED
.void
setRelatedVariants
(Map<String, VariantDetail> relatedVariants) An aggregation of all of theVariants
related to therelatedProducts
.void
setRequest
(CategoryDetailsRequest request) TheCategoryDetailsRequest
made that initiated theCategoryDetails
build process.void
setResolvedCategory
(Category resolvedCategory) The resolved category for therequest
.toString()
-
Constructor Details
-
CategoryDetailsContext
public CategoryDetailsContext() -
CategoryDetailsContext
public CategoryDetailsContext(CategoryDetailsRequest request, Category resolvedCategory, Map<String, List<CategoryAsset>> relatedCategoryAssets, Map<String, org.springframework.data.domain.Page<ProductSummary>> relatedCategoryProducts, org.springframework.data.domain.Page<ProductSummary> relatedRuleBasedProducts, Map<String, ProductSummary> relatedProducts, Map<String, List<ProductAsset>> relatedProductAssets, Map<String, VariantDetail> relatedVariants, Map<String, List<PromotionalCategoryProductSummary>> relatedPromotionalProducts, Map<String, List<ProductTag>> relatedProductTags)
-
-
Method Details
-
getRequest
TheCategoryDetailsRequest
made that initiated theCategoryDetails
build process.- Returns:
- The
CategoryDetailsRequest
made that initiated theCategoryDetails
build process.
-
getResolvedCategory
The resolved category for therequest
.- Returns:
- The resolved category for the
request
.
-
getRelatedCategoryAssets
An aggregation of all of theCategoryAssets
related to theresolvedCategory
.The key is the ID of the parent category.
This allows the DB to be queried fewer times during the build process.
- Returns:
- An aggregation of all of the
CategoryAssets
related to theresolvedCategory
-
getRelatedCategoryProducts
public Map<String,org.springframework.data.domain.Page<ProductSummary>> getRelatedCategoryProducts()An aggregation of all of theProducts
related to theresolvedCategory
.- Returns:
- An aggregation of all of the
Products
related to theresolvedCategory
.
-
getRelatedRuleBasedProducts
An aggregation of all of theProducts
related to theresolvedCategory
when it isCategoryProductMembershipType.RULE_BASED
.- Returns:
- An aggregation of all of the
Products
related to theresolvedCategory
.
-
getRelatedProducts
An aggregation of all of theProducts
related to theresolvedCategory
.This allows the DB to be queried fewer times during the build process.
- Returns:
- An aggregation of all of the
Products
related to theresolvedCategory
-
getRelatedProductAssets
An aggregation of all of theProductAssets
related to therelatedProducts
.The key is the ID of the parent product.
This allows the DB to be queried fewer times during the build process.
- Returns:
- An aggregation of all of the
ProductAssets
related to therelatedProducts
-
getRelatedVariants
An aggregation of all of theVariants
related to therelatedProducts
.This allows the DB to be queried fewer times during the build process.
- Returns:
- An aggregation of all of the
Variants
related to therelatedProducts
-
getRelatedPromotionalProducts
An aggregation of all of thePromotionalProducts
related to theresolvedCategory
mapped by theirtype
.- Returns:
- An aggregation of all of the
PromotionalProducts
related to theresolvedCategory
mapped by theirtype
.
-
getRelatedProductTags
Map of allProductTags
of therelatedProducts
. Mapped by the parent product's ID. TheProductTag.getTag()
should be hydrated before adding to this map.- Returns:
- Map of all
ProductTags
of therelatedProducts
.
-
setRequest
TheCategoryDetailsRequest
made that initiated theCategoryDetails
build process.- Parameters:
request
- TheCategoryDetailsRequest
made that initiated theCategoryDetails
build process.
-
setResolvedCategory
The resolved category for therequest
.- Parameters:
resolvedCategory
- The resolved category for therequest
.
-
setRelatedCategoryAssets
An aggregation of all of theCategoryAssets
related to theresolvedCategory
.The key is the ID of the parent category.
This allows the DB to be queried fewer times during the build process.
- Parameters:
relatedCategoryAssets
- An aggregation of all of theCategoryAssets
related to theresolvedCategory
-
setRelatedCategoryProducts
public void setRelatedCategoryProducts(Map<String, org.springframework.data.domain.Page<ProductSummary>> relatedCategoryProducts) An aggregation of all of theProducts
related to theresolvedCategory
.- Parameters:
relatedCategoryProducts
- An aggregation of all of theProducts
related to theresolvedCategory
.
-
setRelatedRuleBasedProducts
public void setRelatedRuleBasedProducts(org.springframework.data.domain.Page<ProductSummary> relatedRuleBasedProducts) An aggregation of all of theProducts
related to theresolvedCategory
when it isCategoryProductMembershipType.RULE_BASED
.- Parameters:
relatedRuleBasedProducts
- An aggregation of all of theProducts
related to theresolvedCategory
.
-
setRelatedProducts
An aggregation of all of theProducts
related to theresolvedCategory
.This allows the DB to be queried fewer times during the build process.
- Parameters:
relatedProducts
- aggregation of all of theProducts
related to theresolvedCategory
-
setRelatedProductAssets
An aggregation of all of theProductAssets
related to therelatedProducts
.The key is the ID of the parent product.
This allows the DB to be queried fewer times during the build process.
- Parameters:
relatedProductAssets
- An aggregation of all of theProductAssets
related to therelatedProducts
-
setRelatedVariants
An aggregation of all of theVariants
related to therelatedProducts
.This allows the DB to be queried fewer times during the build process.
- Parameters:
relatedVariants
- An aggregation of all of theVariants
related to therelatedProducts
-
setRelatedPromotionalProducts
public void setRelatedPromotionalProducts(Map<String, List<PromotionalCategoryProductSummary>> relatedPromotionalProducts) An aggregation of all of thePromotionalProducts
related to theresolvedCategory
mapped by theirtype
.- Parameters:
relatedPromotionalProducts
- An aggregation of all of thePromotionalProducts
related to theresolvedCategory
mapped by theirtype
.
-
setRelatedProductTags
Map of allProductTags
of therelatedProducts
. Mapped by the parent product's ID. TheProductTag.getTag()
should be hydrated before adding to this map. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getCategoryUrl
-
getCategoryId
-
getProductPageInfo
public org.springframework.data.domain.Pageable getProductPageInfo() -
getAttributes
-
setCategoryUrl
-
setCategoryId
-
setProductPageInfo
public void setProductPageInfo(org.springframework.data.domain.Pageable productPageInfo) -
setAttributes
-