Class BrowseDetailsRequest
java.lang.Object
com.broadleafcommerce.catalog.domain.commerce.BrowseDetailsRequest
- All Implemented Interfaces:
Serializable
A structure representing a request for a commerce-facing browse page including identifying
information for some browse entity such as a
Product or Category for which to get
details and interesting context information. In such a case, the caller does not know whether the
information it has belongs to a Product or Category and the backend should
dynamically determine that and return the corresponding entity.- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBrowseDetailsRequest(Set<String> uris, boolean hydrateCategoryChoiceProducts, boolean hydrateProductAssets, boolean hydrateRelatedProductCharacteristics, String variantHydrationBehavior, boolean hydratePromotionProducts, boolean hydrateProducts, org.springframework.data.domain.Pageable productPageInfo, org.springframework.util.MultiValueMap<String, String> attributes) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanMap holding any additional attributes passed in the request not matching any defined properties.org.springframework.data.domain.PageablePagination info to apply to the products included in the response if this is a request matching aCategory.getUris()One or more URIs identifying one or moreProductsorCategoriesto be fetched.Determines the behavior of the system with regard to hydratingVariantsonto theProductDetailswhen the browse entity resolves to a product orProductSummarieswhen resolved to a category.inthashCode()booleanbooleanWhether to hydrate non-primary product assets onto theProductDetailsresponse.booleanWhether to include category products in the response if the entity is a category.booleanWhether to hydrate promotional products for the requested products if the resolved browse entity is aProduct.booleanWhether to hydrate theCharacteristicsfor the main requested products' related products.voidsetAttributes(org.springframework.util.MultiValueMap<String, String> attributes) Map holding any additional attributes passed in the request not matching any defined properties.voidsetHydrateCategoryChoiceProducts(boolean hydrateCategoryChoiceProducts) voidsetHydrateProductAssets(boolean hydrateProductAssets) Whether to hydrate non-primary product assets onto theProductDetailsresponse.voidsetHydrateProducts(boolean hydrateProducts) Whether to include category products in the response if the entity is a category.voidsetHydratePromotionProducts(boolean hydratePromotionProducts) Whether to hydrate promotional products for the requested products if the resolved browse entity is aProduct.voidsetHydrateRelatedProductCharacteristics(boolean hydrateRelatedProductCharacteristics) Whether to hydrate theCharacteristicsfor the main requested products' related products.voidsetProductPageInfo(org.springframework.data.domain.Pageable productPageInfo) Pagination info to apply to the products included in the response if this is a request matching aCategory.voidOne or more URIs identifying one or moreProductsorCategoriesto be fetched.voidsetVariantHydrationBehavior(String variantHydrationBehavior) Determines the behavior of the system with regard to hydratingVariantsonto theProductDetailswhen the browse entity resolves to a product orProductSummarieswhen resolved to a category.toString()
-
Constructor Details
-
BrowseDetailsRequest
public BrowseDetailsRequest(Set<String> uris, boolean hydrateCategoryChoiceProducts, boolean hydrateProductAssets, boolean hydrateRelatedProductCharacteristics, String variantHydrationBehavior, boolean hydratePromotionProducts, boolean hydrateProducts, org.springframework.data.domain.Pageable productPageInfo, org.springframework.util.MultiValueMap<String, String> attributes) -
BrowseDetailsRequest
public BrowseDetailsRequest()
-
-
Method Details
-
getUris
One or more URIs identifying one or moreProductsorCategoriesto be fetched. The list of URIs should only apply to one entity type, i.e., they should all be product URIs or else they should all be category URIs, not a mix of both.Note: In the case of a category matching, only one category may be returned.
- Returns:
- The URIs identifying the entities to retrieve
-
isHydrateCategoryChoiceProducts
public boolean isHydrateCategoryChoiceProducts()- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
-
isHydrateProductAssets
public boolean isHydrateProductAssets()Whether to hydrate non-primary product assets onto theProductDetailsresponse.- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
-
isHydrateRelatedProductCharacteristics
public boolean isHydrateRelatedProductCharacteristics()Whether to hydrate theCharacteristicsfor the main requested products' related products. The main requested products' characteristics are always hydrated.- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
-
getVariantHydrationBehavior
Determines the behavior of the system with regard to hydratingVariantsonto theProductDetailswhen the browse entity resolves to a product orProductSummarieswhen resolved to a category. Particularly, whether to hydrate all variants for the products, no variants, or onlyLiteVariants. By default, this is null and the behavior is instead determined byProductDetailsProperties.getVariantHydrationBehavior().This is equivalent to
ProductDetailsRequest.getVariantHydrationBehavior()andCategoryDetailsRequest.getVariantHydrationBehavior()and used as appropriate for the type of entity resolved.- Since:
- Catalog Service 2.3.0-GA, Release Train 2.3.0-GA
-
isHydratePromotionProducts
public boolean isHydratePromotionProducts()Whether to hydrate promotional products for the requested products if the resolved browse entity is aProduct.- Since:
- Catalog Service 2.3.0-GA, Release Train 2.3.0-GA
-
isHydrateProducts
public boolean isHydrateProducts()Whether to include category products in the response if the entity is a category.- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
-
getProductPageInfo
public org.springframework.data.domain.Pageable getProductPageInfo()Pagination info to apply to the products included in the response if this is a request matching aCategory.- Returns:
- Pagination info to apply to the products included in the response if this is a
request matching a
Category.
-
getAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
setUris
One or more URIs identifying one or moreProductsorCategoriesto be fetched. The list of URIs should only apply to one entity type, i.e., they should all be product URIs or else they should all be category URIs, not a mix of both.Note: In the case of a category matching, only one category may be returned.
- Parameters:
uris- The URIs identifying the entities to retrieve
-
setHydrateCategoryChoiceProducts
public void setHydrateCategoryChoiceProducts(boolean hydrateCategoryChoiceProducts) - Since:
- Catalog Service 2.2.0, Release Train 2.2.0
-
setHydrateProductAssets
public void setHydrateProductAssets(boolean hydrateProductAssets) Whether to hydrate non-primary product assets onto theProductDetailsresponse.- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
-
setHydrateRelatedProductCharacteristics
public void setHydrateRelatedProductCharacteristics(boolean hydrateRelatedProductCharacteristics) Whether to hydrate theCharacteristicsfor the main requested products' related products. The main requested products' characteristics are always hydrated.- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
-
setVariantHydrationBehavior
Determines the behavior of the system with regard to hydratingVariantsonto theProductDetailswhen the browse entity resolves to a product orProductSummarieswhen resolved to a category. Particularly, whether to hydrate all variants for the products, no variants, or onlyLiteVariants. By default, this is null and the behavior is instead determined byProductDetailsProperties.getVariantHydrationBehavior().This is equivalent to
ProductDetailsRequest.getVariantHydrationBehavior()andCategoryDetailsRequest.getVariantHydrationBehavior()and used as appropriate for the type of entity resolved.- Since:
- Catalog Service 2.3.0-GA, Release Train 2.3.0-GA
-
setHydratePromotionProducts
public void setHydratePromotionProducts(boolean hydratePromotionProducts) Whether to hydrate promotional products for the requested products if the resolved browse entity is aProduct.- Since:
- Catalog Service 2.3.0-GA, Release Train 2.3.0-GA
-
setHydrateProducts
public void setHydrateProducts(boolean hydrateProducts) Whether to include category products in the response if the entity is a category.- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
-
setProductPageInfo
public void setProductPageInfo(org.springframework.data.domain.Pageable productPageInfo) Pagination info to apply to the products included in the response if this is a request matching aCategory.- Parameters:
productPageInfo- Pagination info to apply to the products included in the response if this is a request matching aCategory.
-
setAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-