Interface ProductDraftImport

All Superinterfaces:
ImportResource

public interface ProductDraftImport extends ImportResource

The representation of a Product Draft for the import purpose.


Example to create an instance using the builder pattern

     ProductDraftImport productDraftImport = ProductDraftImport.builder()
             .key("{key}")
             .productType(productTypeBuilder -> productTypeBuilder)
             .name(nameBuilder -> nameBuilder)
             .slug(slugBuilder -> slugBuilder)
             .build()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier. If a Product with this key exists, it is updated with the imported data.

      Specified by:
      getKey in interface ImportResource
      Returns:
      key
    • getProductType

      @NotNull @Valid @NotNull @Valid ProductTypeKeyReference getProductType()

      Maps to Product.productType. If the referenced ProductType does not exist, the state of the ImportOperation will be set to unresolved until the referenced ProductType is created.

      Returns:
      productType
    • getName

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

      Maps to ProductData.name.

      Returns:
      name
    • getSlug

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

      Maps to ProductData.slug.

      Returns:
      slug
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Maps to ProductData.description.

      Returns:
      description
    • getCategories

      @Valid @Valid List<CategoryKeyReference> getCategories()

      Maps to ProductData.categories. If the referenced Categories do not exist, the state of the ImportOperation will be set to unresolved until the referenced Categories are created.

      Returns:
      categories
    • getAttributes

      @Valid @Valid List<Attribute> getAttributes()
      Returns:
      attributes
    • getMetaTitle

      @Valid @Valid LocalizedString getMetaTitle()

      Maps to ProductData.metaTitle.

      Returns:
      metaTitle
    • getMetaDescription

      @Valid @Valid LocalizedString getMetaDescription()

      Maps to ProductData.metaDescription.

      Returns:
      metaDescription
    • getMetaKeywords

      @Valid @Valid LocalizedString getMetaKeywords()

      Maps to ProductData.metaKeywords.

      Returns:
      metaKeywords
    • getMasterVariant

      @Valid @Valid ProductVariantDraftImport getMasterVariant()

      The master ProductVariant. Required if variants contains at least one ProductVariant.

      Returns:
      masterVariant
    • getVariants

      @Valid @Valid List<ProductVariantDraftImport> getVariants()

      An array of related ProductVariants.

      Returns:
      variants
    • getTaxCategory

      @Valid @Valid TaxCategoryKeyReference getTaxCategory()

      Maps to Product.taxCategory. If the referenced TaxCategory does not exist, the state of the ImportOperation will be set to unresolved until the referenced TaxCategory is created.

      Returns:
      taxCategory
    • getSearchKeywords

      @Valid @Valid SearchKeywords getSearchKeywords()

      Maps to ProductData.searchKeywords.

      Returns:
      searchKeywords
    • getState

      @Valid @Valid StateKeyReference getState()

      Maps to Product.state. If the referenced State does not exist, the state of the ImportOperation will be set to unresolved until the referenced State is created.

      Returns:
      state
    • getPublish

      Boolean getPublish()

      Determines the published status and current/staged projection of the Product. For more information, see Managing the published state of Products.

      Returns:
      publish
    • getPriceMode

      ProductPriceModeEnum getPriceMode()

      Maps to Product.priceMode. If not provided, the existing Product.priceMode is not changed.

      Returns:
      priceMode
    • setKey

      void setKey(String key)

      User-defined unique identifier. If a Product with this key exists, it is updated with the imported data.

      Specified by:
      setKey in interface ImportResource
      Parameters:
      key - value to be set
    • setProductType

      void setProductType(ProductTypeKeyReference productType)

      Maps to Product.productType. If the referenced ProductType does not exist, the state of the ImportOperation will be set to unresolved until the referenced ProductType is created.

      Parameters:
      productType - value to be set
    • setName

      void setName(LocalizedString name)

      Maps to ProductData.name.

      Parameters:
      name - value to be set
    • setSlug

      void setSlug(LocalizedString slug)

      Maps to ProductData.slug.

      Parameters:
      slug - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Maps to ProductData.description.

      Parameters:
      description - value to be set
    • setCategories

      void setCategories(CategoryKeyReference... categories)

      Maps to ProductData.categories. If the referenced Categories do not exist, the state of the ImportOperation will be set to unresolved until the referenced Categories are created.

      Parameters:
      categories - values to be set
    • setCategories

      void setCategories(List<CategoryKeyReference> categories)

      Maps to ProductData.categories. If the referenced Categories do not exist, the state of the ImportOperation will be set to unresolved until the referenced Categories are created.

      Parameters:
      categories - values to be set
    • setAttributes

      void setAttributes(Attribute... attributes)
      set attributes
      Parameters:
      attributes - values to be set
    • setAttributes

      void setAttributes(List<Attribute> attributes)
      set attributes
      Parameters:
      attributes - values to be set
    • setMetaTitle

      void setMetaTitle(LocalizedString metaTitle)

      Maps to ProductData.metaTitle.

      Parameters:
      metaTitle - value to be set
    • setMetaDescription

      void setMetaDescription(LocalizedString metaDescription)

      Maps to ProductData.metaDescription.

      Parameters:
      metaDescription - value to be set
    • setMetaKeywords

      void setMetaKeywords(LocalizedString metaKeywords)

      Maps to ProductData.metaKeywords.

      Parameters:
      metaKeywords - value to be set
    • setMasterVariant

      void setMasterVariant(ProductVariantDraftImport masterVariant)

      The master ProductVariant. Required if variants contains at least one ProductVariant.

      Parameters:
      masterVariant - value to be set
    • setVariants

      void setVariants(ProductVariantDraftImport... variants)

      An array of related ProductVariants.

      Parameters:
      variants - values to be set
    • setVariants

      void setVariants(List<ProductVariantDraftImport> variants)

      An array of related ProductVariants.

      Parameters:
      variants - values to be set
    • setTaxCategory

      void setTaxCategory(TaxCategoryKeyReference taxCategory)

      Maps to Product.taxCategory. If the referenced TaxCategory does not exist, the state of the ImportOperation will be set to unresolved until the referenced TaxCategory is created.

      Parameters:
      taxCategory - value to be set
    • setSearchKeywords

      void setSearchKeywords(SearchKeywords searchKeywords)

      Maps to ProductData.searchKeywords.

      Parameters:
      searchKeywords - value to be set
    • setState

      void setState(StateKeyReference state)

      Maps to Product.state. If the referenced State does not exist, the state of the ImportOperation will be set to unresolved until the referenced State is created.

      Parameters:
      state - value to be set
    • setPublish

      void setPublish(Boolean publish)

      Determines the published status and current/staged projection of the Product. For more information, see Managing the published state of Products.

      Parameters:
      publish - value to be set
    • setPriceMode

      void setPriceMode(ProductPriceModeEnum priceMode)

      Maps to Product.priceMode. If not provided, the existing Product.priceMode is not changed.

      Parameters:
      priceMode - value to be set
    • of

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

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

      ProductDraftImport copyDeep()
      Specified by:
      copyDeep in interface ImportResource
    • deepCopy

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

      static ProductDraftImportBuilder builder()
      builder factory method for ProductDraftImport
      Returns:
      builder
    • builder

      static ProductDraftImportBuilder builder(ProductDraftImport template)
      create builder for ProductDraftImport instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductDraftImport

      default <T> T withProductDraftImport(Function<ProductDraftImport,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<ProductDraftImport> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference