Class ProductDetailsRequest

java.lang.Object
com.broadleafcommerce.catalog.domain.product.commerce.ProductDetailsRequest
All Implemented Interfaces:
Serializable

public class ProductDetailsRequest extends Object implements Serializable
A structure representing a request for a commerce-facing product details page including identifying information for the product for which to get details and interesting context information.
Author:
Nathan Moore (nathandmoore)
See Also:
  • Constructor Details

    • ProductDetailsRequest

      public ProductDetailsRequest(Set<String> productUris, Set<String> productIds, boolean hydrateCategoryChoiceProducts, boolean hydrateProductAssets, boolean hydrateRelatedProductCharacteristics, Map<String,Object> attributes)
    • ProductDetailsRequest

      public ProductDetailsRequest()
  • Method Details

    • addAttribute

      public void addAttribute(String name, Object value)
      Takes in any additional attributes passed in the request not matching any defined properties.
      Parameters:
      name - Name of the additional attribute
      value - Value of the additional attribute
    • getAttribute

      public Map<String,Object> getAttribute()
      Return any additional attributes passed in the request not matching any defined properties.
      Returns:
      any additional attributes passed in the request not matching any defined properties.
    • getProductUris

      public Set<String> getProductUris()
      The product uris matching the products for which ProductDetails are requested. If productIds is non-null, then it is used instead of this field.
      Returns:
      The product uri matching the product for which ProductDetails are requested.
    • getProductIds

      public Set<String> getProductIds()
      The Product.getId() product IDs} matching the products for which ProductDetails are requested. If this field is non-null, then it is used instead of productUris.
      Returns:
      The Product.getId() product ID} matching the product for which ProductDetails are requested.
    • isHydrateCategoryChoiceProducts

      public boolean isHydrateCategoryChoiceProducts()
      Whether to hydrate category products onto categories belonging to ItemChoice ProductOptions if the entity is a product.
      Since:
      Catalog Service 2.2.0, Release Train 2.2.0
    • isHydrateProductAssets

      public boolean isHydrateProductAssets()
      Whether to hydrate non-primary product assets onto the ProductDetails response if the entity is a product.
      Since:
      Catalog Service 2.2.0, Release Train 2.2.0
    • isHydrateRelatedProductCharacteristics

      public boolean isHydrateRelatedProductCharacteristics()
      Whether to hydrate the Characteristics for the main requested products' related products if the entity is a product. The main requested products' characteristics are always hydrated.
      Since:
      Catalog Service 2.2.0, Release Train 2.2.0
    • getAttributes

      public Map<String,Object> getAttributes()
      Map holding any additional attributes passed in the request not matching any defined properties.
    • setProductUris

      public void setProductUris(Set<String> productUris)
      The product uris matching the products for which ProductDetails are requested. If productIds is non-null, then it is used instead of this field.
      Parameters:
      uri - The product uri matching the product for which ProductDetails are requested.
    • setProductIds

      public void setProductIds(Set<String> productIds)
      The Product.getId() product IDs} matching the products for which ProductDetails are requested. If this field is non-null, then it is used instead of productUris.
      Parameters:
      uri - The Product.getId() product ID} matching the product for which ProductDetails are requested.
    • setHydrateCategoryChoiceProducts

      public void setHydrateCategoryChoiceProducts(boolean hydrateCategoryChoiceProducts)
      Whether to hydrate category products onto categories belonging to ItemChoice ProductOptions if the entity is a product.
      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 the ProductDetails response if the entity is a product.
      Since:
      Catalog Service 2.2.0, Release Train 2.2.0
    • setHydrateRelatedProductCharacteristics

      public void setHydrateRelatedProductCharacteristics(boolean hydrateRelatedProductCharacteristics)
      Whether to hydrate the Characteristics for the main requested products' related products if the entity is a product. The main requested products' characteristics are always hydrated.
      Since:
      Catalog Service 2.2.0, Release Train 2.2.0
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Map holding any additional attributes passed in the request not matching any defined properties.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object