Class ProductDraftImportImpl
- All Implemented Interfaces:
ImportResource
,ProductDraftImport
,io.vrap.rmf.base.client.ModelBase
The representation of a Product Draft for the import purpose.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
The Reference to the Categories with which the ProductDraft is associated.Maps toProduct.description
.getKey()
User-defined unique identifier.The master Product variant.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.getName()
Determines the type of Prices the API uses.TheproductType
of a Product.Ifpublish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data.Search keywords are primarily used by the suggester but are also considered for the full-text search.getSlug()
Human-readable identifiers usually used as deep-link URL to the related product.getState()
The Reference to the State with which the ProductDraft is associated.The Reference to the TaxCategory with which the ProductDraft is associated.An array of related Product Variants.int
hashCode()
void
setCategories
(CategoryKeyReference... categories) The Reference to the Categories with which the ProductDraft is associated.void
setCategories
(List<CategoryKeyReference> categories) The Reference to the Categories with which the ProductDraft is associated.void
setDescription
(LocalizedString description) Maps toProduct.description
.void
User-defined unique identifier.void
setMasterVariant
(ProductVariantDraftImport masterVariant) The master Product variant.void
setMetaDescription
(LocalizedString metaDescription) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.void
setMetaKeywords
(LocalizedString metaKeywords) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.void
setMetaTitle
(LocalizedString metaTitle) A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.void
setName
(LocalizedString name) set namevoid
setPriceMode
(ProductPriceModeEnum priceMode) Determines the type of Prices the API uses.void
setProductType
(ProductTypeKeyReference productType) TheproductType
of a Product.void
setPublish
(Boolean publish) Ifpublish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data.void
setSearchKeywords
(SearchKeywords searchKeywords) Search keywords are primarily used by the suggester but are also considered for the full-text search.void
setSlug
(LocalizedString slug) Human-readable identifiers usually used as deep-link URL to the related product.void
setState
(StateKeyReference state) The Reference to the State with which the ProductDraft is associated.void
setTaxCategory
(TaxCategoryKeyReference taxCategory) The Reference to the TaxCategory with which the ProductDraft is associated.void
setVariants
(ProductVariantDraftImport... variants) An array of related Product Variants.void
setVariants
(List<ProductVariantDraftImport> variants) An array of related Product Variants.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.importapi.models.common.ImportResource
withImportResource
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.importapi.models.productdrafts.ProductDraftImport
withProductDraftImport
-
Constructor Details
-
ProductDraftImportImpl
public ProductDraftImportImpl()create empty instance
-
-
Method Details
-
getKey
User-defined unique identifier.
- Specified by:
getKey
in interfaceImportResource
- Returns:
- key
-
getProductType
The
productType
of a Product. Maps toProduct.productType
. The Reference to the ProductType with which the ProductDraft is associated. If referenced ProductType does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary ProductType is created.- Specified by:
getProductType
in interfaceProductDraftImport
- Returns:
- productType
-
getName
- Specified by:
getName
in interfaceProductDraftImport
- Returns:
- name
-
getSlug
Human-readable identifiers usually used as deep-link URL to the related product. Each slug must be unique across a project, but a product can have the same slug for different languages. Allowed are alphabetic, numeric, underscore (_) and hyphen (-) characters.
- Specified by:
getSlug
in interfaceProductDraftImport
- Returns:
- slug
-
getDescription
Maps to
Product.description
.- Specified by:
getDescription
in interfaceProductDraftImport
- Returns:
- description
-
getCategories
The Reference to the Categories with which the ProductDraft is associated. If referenced Categories do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Categories are created.- Specified by:
getCategories
in interfaceProductDraftImport
- Returns:
- categories
-
getMetaTitle
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Specified by:
getMetaTitle
in interfaceProductDraftImport
- Returns:
- metaTitle
-
getMetaDescription
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Specified by:
getMetaDescription
in interfaceProductDraftImport
- Returns:
- metaDescription
-
getMetaKeywords
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Specified by:
getMetaKeywords
in interfaceProductDraftImport
- Returns:
- metaKeywords
-
getMasterVariant
The master Product variant. Required if the
variants
array contains a Product Variant.- Specified by:
getMasterVariant
in interfaceProductDraftImport
- Returns:
- masterVariant
-
getVariants
An array of related Product Variants.
- Specified by:
getVariants
in interfaceProductDraftImport
- Returns:
- variants
-
getTaxCategory
The Reference to the TaxCategory with which the ProductDraft is associated. If referenced TaxCategory does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary TaxCategory is created.- Specified by:
getTaxCategory
in interfaceProductDraftImport
- Returns:
- taxCategory
-
getSearchKeywords
Search keywords are primarily used by the suggester but are also considered for the full-text search. SearchKeywords is a JSON object where the keys are of IETF language tag. The value to a language tag key is an array of SearchKeyword for the specific language.
{ "en": [ { "text": "Multi tool" }, { "text": "Swiss Army Knife", "suggestTokenizer": { "type": "whitespace" } } ], "de": [ { "text": "Schweizer Messer", "suggestTokenizer": { "type": "custom", "inputs": ["schweizer messer", "offiziersmesser", "sackmesser"] } } ] }
- Specified by:
getSearchKeywords
in interfaceProductDraftImport
- Returns:
- searchKeywords
-
getState
The Reference to the State with which the ProductDraft is associated. If referenced State does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary State is created.- Specified by:
getState
in interfaceProductDraftImport
- Returns:
- state
-
getPublish
If
publish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data. Ifpublish
is not set, the staged projection is set to the provided import data, but the current projection stays unchanged. However, if the import data contains no update, that is, if it matches the staged projection of the existing Product, the import induces no change in the existing Product whetherpublish
is set or not.- Specified by:
getPublish
in interfaceProductDraftImport
- Returns:
- publish
-
getPriceMode
Determines the type of Prices the API uses. See ProductPriceMode for more details. If not provided, the existing
Product.priceMode
is not changed.- Specified by:
getPriceMode
in interfaceProductDraftImport
- Returns:
- priceMode
-
setKey
Description copied from interface:ImportResource
User-defined unique identifier.
- Specified by:
setKey
in interfaceImportResource
- Parameters:
key
- value to be set
-
setProductType
Description copied from interface:ProductDraftImport
The
productType
of a Product. Maps toProduct.productType
. The Reference to the ProductType with which the ProductDraft is associated. If referenced ProductType does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary ProductType is created.- Specified by:
setProductType
in interfaceProductDraftImport
- Parameters:
productType
- value to be set
-
setName
Description copied from interface:ProductDraftImport
set name- Specified by:
setName
in interfaceProductDraftImport
- Parameters:
name
- value to be set
-
setSlug
Description copied from interface:ProductDraftImport
Human-readable identifiers usually used as deep-link URL to the related product. Each slug must be unique across a project, but a product can have the same slug for different languages. Allowed are alphabetic, numeric, underscore (_) and hyphen (-) characters.
- Specified by:
setSlug
in interfaceProductDraftImport
- Parameters:
slug
- value to be set
-
setDescription
Description copied from interface:ProductDraftImport
Maps to
Product.description
.- Specified by:
setDescription
in interfaceProductDraftImport
- Parameters:
description
- value to be set
-
setCategories
Description copied from interface:ProductDraftImport
The Reference to the Categories with which the ProductDraft is associated. If referenced Categories do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Categories are created.- Specified by:
setCategories
in interfaceProductDraftImport
- Parameters:
categories
- values to be set
-
setCategories
Description copied from interface:ProductDraftImport
The Reference to the Categories with which the ProductDraft is associated. If referenced Categories do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Categories are created.- Specified by:
setCategories
in interfaceProductDraftImport
- Parameters:
categories
- values to be set
-
setMetaTitle
Description copied from interface:ProductDraftImport
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Specified by:
setMetaTitle
in interfaceProductDraftImport
- Parameters:
metaTitle
- value to be set
-
setMetaDescription
Description copied from interface:ProductDraftImport
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Specified by:
setMetaDescription
in interfaceProductDraftImport
- Parameters:
metaDescription
- value to be set
-
setMetaKeywords
Description copied from interface:ProductDraftImport
A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.
{ "de": "Hundefutter", "en": "dog food" }
- Specified by:
setMetaKeywords
in interfaceProductDraftImport
- Parameters:
metaKeywords
- value to be set
-
setMasterVariant
Description copied from interface:ProductDraftImport
The master Product variant. Required if the
variants
array contains a Product Variant.- Specified by:
setMasterVariant
in interfaceProductDraftImport
- Parameters:
masterVariant
- value to be set
-
setVariants
Description copied from interface:ProductDraftImport
An array of related Product Variants.
- Specified by:
setVariants
in interfaceProductDraftImport
- Parameters:
variants
- values to be set
-
setVariants
Description copied from interface:ProductDraftImport
An array of related Product Variants.
- Specified by:
setVariants
in interfaceProductDraftImport
- Parameters:
variants
- values to be set
-
setTaxCategory
Description copied from interface:ProductDraftImport
The Reference to the TaxCategory with which the ProductDraft is associated. If referenced TaxCategory does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary TaxCategory is created.- Specified by:
setTaxCategory
in interfaceProductDraftImport
- Parameters:
taxCategory
- value to be set
-
setSearchKeywords
Description copied from interface:ProductDraftImport
Search keywords are primarily used by the suggester but are also considered for the full-text search. SearchKeywords is a JSON object where the keys are of IETF language tag. The value to a language tag key is an array of SearchKeyword for the specific language.
{ "en": [ { "text": "Multi tool" }, { "text": "Swiss Army Knife", "suggestTokenizer": { "type": "whitespace" } } ], "de": [ { "text": "Schweizer Messer", "suggestTokenizer": { "type": "custom", "inputs": ["schweizer messer", "offiziersmesser", "sackmesser"] } } ] }
- Specified by:
setSearchKeywords
in interfaceProductDraftImport
- Parameters:
searchKeywords
- value to be set
-
setState
Description copied from interface:ProductDraftImport
The Reference to the State with which the ProductDraft is associated. If referenced State does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary State is created.- Specified by:
setState
in interfaceProductDraftImport
- Parameters:
state
- value to be set
-
setPublish
Description copied from interface:ProductDraftImport
If
publish
is set to eithertrue
orfalse
, both staged and current projections are set to the same value provided by the import data. Ifpublish
is not set, the staged projection is set to the provided import data, but the current projection stays unchanged. However, if the import data contains no update, that is, if it matches the staged projection of the existing Product, the import induces no change in the existing Product whetherpublish
is set or not.- Specified by:
setPublish
in interfaceProductDraftImport
- Parameters:
publish
- value to be set
-
setPriceMode
Description copied from interface:ProductDraftImport
Determines the type of Prices the API uses. See ProductPriceMode for more details. If not provided, the existing
Product.priceMode
is not changed.- Specified by:
setPriceMode
in interfaceProductDraftImport
- Parameters:
priceMode
- value to be set
-
equals
-
hashCode
-