Interface ProductData

All Superinterfaces:
MetaAttributes, ProductDataLike, WithLocalizedSlug

public interface ProductData extends ProductDataLike
ProductData
Example to create an instance using the builder pattern

     ProductData productData = ProductData.builder()
             .name(nameBuilder -> nameBuilder)
             .plusCategories(categoriesBuilder -> categoriesBuilder)
             .slug(slugBuilder -> slugBuilder)
             .masterVariant(masterVariantBuilder -> masterVariantBuilder)
             .plusVariants(variantsBuilder -> variantsBuilder)
             .searchKeywords(searchKeywordsBuilder -> searchKeywordsBuilder)
             .plusAttributes(attributesBuilder -> attributesBuilder)
             .build()
 
  • Method Details

    • getName

      @NotNull @Valid @NotNull @Valid LocalizedString getName()

      Name of the Product.

      Specified by:
      getName in interface ProductDataLike
      Returns:
      name
    • getCategories

      @NotNull @Valid @NotNull @Valid List<CategoryReference> getCategories()

      Categories assigned to the Product.

      Specified by:
      getCategories in interface ProductDataLike
      Returns:
      categories
    • getCategoryOrderHints

      @Valid @Valid CategoryOrderHints getCategoryOrderHints()

      Numerical values to allow ordering of Products within a specified Category.

      Specified by:
      getCategoryOrderHints in interface ProductDataLike
      Returns:
      categoryOrderHints
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of the Product.

      Specified by:
      getDescription in interface ProductDataLike
      Returns:
      description
    • getSlug

      @NotNull @Valid @NotNull @Valid LocalizedString getSlug()

      User-defined identifier used in a deep-link URL for the Product. Must be unique across a Project, but can be the same for Products in different Locales. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

      Specified by:
      getSlug in interface ProductDataLike
      Specified by:
      getSlug in interface WithLocalizedSlug
      Returns:
      slug
    • getMetaTitle

      @Valid @Valid LocalizedString getMetaTitle()

      Title of the Product as used by search engines.

      Specified by:
      getMetaTitle in interface MetaAttributes
      Specified by:
      getMetaTitle in interface ProductDataLike
      Returns:
      metaTitle
    • getMetaDescription

      @Valid @Valid LocalizedString getMetaDescription()

      Description of the Product as used by search engines.

      Specified by:
      getMetaDescription in interface MetaAttributes
      Specified by:
      getMetaDescription in interface ProductDataLike
      Returns:
      metaDescription
    • getMetaKeywords

      @Valid @Valid LocalizedString getMetaKeywords()

      Keywords that give additional information about the Product to search engines.

      Specified by:
      getMetaKeywords in interface MetaAttributes
      Specified by:
      getMetaKeywords in interface ProductDataLike
      Returns:
      metaKeywords
    • getMasterVariant

      @NotNull @Valid @NotNull @Valid ProductVariant getMasterVariant()

      The Master Variant of the Product.

      Omitted when the Project has the ProductCatalogModel Modular. Use the Variants API instead.

      Specified by:
      getMasterVariant in interface ProductDataLike
      Returns:
      masterVariant
      See Also:
    • getVariants

      @NotNull @Valid @NotNull @Valid List<ProductVariant> getVariants()

      Additional Product Variants.

      Empty when the Project has the ProductCatalogModel Modular. Use the Variants API instead.

      Specified by:
      getVariants in interface ProductDataLike
      Returns:
      variants
      See Also:
    • getSearchKeywords

      @NotNull @Valid @NotNull @Valid SearchKeywords getSearchKeywords()

      Used by Search Term Suggestions, but is also considered for a full text search in the Product Projection Search API.

      Specified by:
      getSearchKeywords in interface ProductDataLike
      Returns:
      searchKeywords
    • getAttributes

      @NotNull @Valid @NotNull @Valid List<Attribute> getAttributes()

      Product Attributes according to the respective AttributeDefinition. Not supported by Product Projection Search.

      Specified by:
      getAttributes in interface ProductDataLike
      Returns:
      attributes
    • getDefaultVariant

      @Valid @Valid VariantReference getDefaultVariant()

      Reference to the default Variant of the Product. Only available for Projects with productCatalogModel set to Modular. The reference is automatically cleared when the referenced Variant is deleted; in that case, the response of the Delete Variant request includes a DefaultVariantDeleted warning.

      Returns:
      defaultVariant
    • setName

      void setName(LocalizedString name)

      Name of the Product.

      Parameters:
      name - value to be set
    • setCategories

      void setCategories(CategoryReference... categories)

      Categories assigned to the Product.

      Parameters:
      categories - values to be set
    • setCategories

      void setCategories(List<CategoryReference> categories)

      Categories assigned to the Product.

      Parameters:
      categories - values to be set
    • setCategoryOrderHints

      void setCategoryOrderHints(CategoryOrderHints categoryOrderHints)

      Numerical values to allow ordering of Products within a specified Category.

      Parameters:
      categoryOrderHints - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of the Product.

      Parameters:
      description - value to be set
    • setSlug

      void setSlug(LocalizedString slug)

      User-defined identifier used in a deep-link URL for the Product. Must be unique across a Project, but can be the same for Products in different Locales. Matches the pattern [a-zA-Z0-9_\\-]{2,256}.

      Parameters:
      slug - value to be set
    • setMetaTitle

      void setMetaTitle(LocalizedString metaTitle)

      Title of the Product as used by search engines.

      Parameters:
      metaTitle - value to be set
    • setMetaDescription

      void setMetaDescription(LocalizedString metaDescription)

      Description of the Product as used by search engines.

      Parameters:
      metaDescription - value to be set
    • setMetaKeywords

      void setMetaKeywords(LocalizedString metaKeywords)

      Keywords that give additional information about the Product to search engines.

      Parameters:
      metaKeywords - value to be set
    • setMasterVariant

      void setMasterVariant(ProductVariant masterVariant)

      The Master Variant of the Product.

      Omitted when the Project has the ProductCatalogModel Modular. Use the Variants API instead.

      Parameters:
      masterVariant - value to be set
    • setVariants

      void setVariants(ProductVariant... variants)

      Additional Product Variants.

      Empty when the Project has the ProductCatalogModel Modular. Use the Variants API instead.

      Parameters:
      variants - values to be set
    • setVariants

      void setVariants(List<ProductVariant> variants)

      Additional Product Variants.

      Empty when the Project has the ProductCatalogModel Modular. Use the Variants API instead.

      Parameters:
      variants - values to be set
    • setSearchKeywords

      void setSearchKeywords(SearchKeywords searchKeywords)

      Used by Search Term Suggestions, but is also considered for a full text search in the Product Projection Search API.

      Parameters:
      searchKeywords - value to be set
    • setAttributes

      void setAttributes(Attribute... attributes)

      Product Attributes according to the respective AttributeDefinition. Not supported by Product Projection Search.

      Parameters:
      attributes - values to be set
    • setAttributes

      void setAttributes(List<Attribute> attributes)

      Product Attributes according to the respective AttributeDefinition. Not supported by Product Projection Search.

      Parameters:
      attributes - values to be set
    • setDefaultVariant

      void setDefaultVariant(VariantReference defaultVariant)

      Reference to the default Variant of the Product. Only available for Projects with productCatalogModel set to Modular. The reference is automatically cleared when the referenced Variant is deleted; in that case, the response of the Delete Variant request includes a DefaultVariantDeleted warning.

      Parameters:
      defaultVariant - value to be set
    • of

      static ProductData of()
      factory method
      Returns:
      instance of ProductData
    • of

      static ProductData of(ProductData template)
      factory method to create a shallow copy ProductData
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      ProductData copyDeep()
    • deepCopy

      @Nullable static ProductData deepCopy(@Nullable ProductData template)
      factory method to create a deep copy of ProductData
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ProductDataBuilder builder()
      builder factory method for ProductData
      Returns:
      builder
    • builder

      static ProductDataBuilder builder(ProductData template)
      create builder for ProductData instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductData

      default <T> T withProductData(Function<ProductData,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<ProductData> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference