Interface ProductDraft

All Superinterfaces:
io.vrap.rmf.base.client.Draft<ProductDraft>, WithKey
All Known Implementing Classes:
ProductDraftImpl

public interface ProductDraft extends WithKey, io.vrap.rmf.base.client.Draft<ProductDraft>
ProductDraft
Example to create an instance using the builder pattern

     ProductDraft productDraft = ProductDraft.builder()
             .productType(productTypeBuilder -> productTypeBuilder)
             .name(nameBuilder -> nameBuilder)
             .slug(slugBuilder -> slugBuilder)
             .build()
 
  • Method Details

    • getProductType

      @NotNull @Valid @NotNull @Valid ProductTypeResourceIdentifier getProductType()

      The Product Type defining the Attributes for the Product. Cannot be changed later.

      Returns:
      productType
    • getName

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

      Name of the Product.

      Returns:
      name
    • getSlug

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

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

      Returns:
      slug
    • getKey

      User-defined unique identifier for the Product.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getDescription

      Description of the Product.

      Returns:
      description
    • getCategories

      Categories assigned to the Product.

      Returns:
      categories
    • getCategoryOrderHints

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

      Returns:
      categoryOrderHints
    • getMetaTitle

      @Valid @Valid LocalizedString getMetaTitle()

      Title of the Product displayed in search results.

      Returns:
      metaTitle
    • getMetaDescription

      Description of the Product displayed in search results.

      Returns:
      metaDescription
    • getMetaKeywords

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

      Returns:
      metaKeywords
    • getMasterVariant

      The Product Variant to be the Master Variant for the Product. Required if variants are provided also.

      Returns:
      masterVariant
    • getVariants

      The additional Product Variants for the Product.

      Returns:
      variants
    • getTaxCategory

      The Tax Category to be assigned to the Product.

      Returns:
      taxCategory
    • getSearchKeywords

      Used by Product Suggestions, but is also considered for a full text search.

      Returns:
      searchKeywords
    • getState

      State to be assigned to the Product.

      Returns:
      state
    • getPublish

      If true, the Product is published immediately to the current projection.

      Returns:
      publish
    • getPriceMode

      Specifies the type of prices used when looking up a price for the Product.

      Returns:
      priceMode
    • setProductType

      The Product Type defining the Attributes for the Product. Cannot be changed later.

      Parameters:
      productType - value to be set
    • setName

      Name of the Product.

      Parameters:
      name - value to be set
    • setSlug

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

      Parameters:
      slug - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier for the Product.

      Parameters:
      key - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of the Product.

      Parameters:
      description - value to be set
    • setCategories

      Categories assigned to the Product.

      Parameters:
      categories - values to be set
    • setCategories

      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
    • setMetaTitle

      void setMetaTitle(LocalizedString metaTitle)

      Title of the Product displayed in search results.

      Parameters:
      metaTitle - value to be set
    • setMetaDescription

      void setMetaDescription(LocalizedString metaDescription)

      Description of the Product displayed in search results.

      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

      The Product Variant to be the Master Variant for the Product. Required if variants are provided also.

      Parameters:
      masterVariant - value to be set
    • setVariants

      void setVariants(ProductVariantDraft... variants)

      The additional Product Variants for the Product.

      Parameters:
      variants - values to be set
    • setVariants

      The additional Product Variants for the Product.

      Parameters:
      variants - values to be set
    • setTaxCategory

      The Tax Category to be assigned to the Product.

      Parameters:
      taxCategory - value to be set
    • setSearchKeywords

      void setSearchKeywords(SearchKeywords searchKeywords)

      Used by Product Suggestions, but is also considered for a full text search.

      Parameters:
      searchKeywords - value to be set
    • setState

      State to be assigned to the Product.

      Parameters:
      state - value to be set
    • setPublish

      void setPublish(Boolean publish)

      If true, the Product is published immediately to the current projection.

      Parameters:
      publish - value to be set
    • setPriceMode

      Specifies the type of prices used when looking up a price for the Product.

      Parameters:
      priceMode - value to be set
    • of

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

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

      factory method to create a deep copy of ProductDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductDraft
      Returns:
      builder
    • builder

      create builder for ProductDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductDraft

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

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