Interface CategoryImport
- All Superinterfaces:
ImportResource
The data representation for a Category to be imported that is persisted as a Category in the Project.
Example to create an instance using the builder pattern
CategoryImport categoryImport = CategoryImport.builder()
.key("{key}")
.name(nameBuilder -> nameBuilder)
.slug(slugBuilder -> slugBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CategoryImportBuilder
builder()
builder factory method for CategoryImportstatic CategoryImportBuilder
builder
(CategoryImport template) create builder for CategoryImport instancestatic CategoryImport
deepCopy
(CategoryImport template) factory method to create a deep copy of CategoryImport@Valid Custom
The custom fields for this Category.@Valid LocalizedString
Maps toCategory.description
.Maps toCategory.externalId
.@NotNull String
getKey()
User-defined unique identifier.@Valid LocalizedString
Maps toCategory.metaDescription
.@Valid LocalizedString
Maps toCategory.metaKeywords
.@Valid LocalizedString
Maps toCategory.metaTitle
.@NotNull @Valid LocalizedString
getName()
Maps toCategory.name
.Maps toCategory.orderHint
.@Valid CategoryKeyReference
Maps toCategory.parent
.@NotNull @Valid LocalizedString
getSlug()
Maps toCategory.slug
.static CategoryImport
of()
factory methodstatic CategoryImport
of
(CategoryImport template) factory method to create a shallow copy CategoryImportvoid
set assetsvoid
set assetsvoid
The custom fields for this Category.void
setDescription
(LocalizedString description) Maps toCategory.description
.void
setExternalId
(String externalId) Maps toCategory.externalId
.void
User-defined unique identifier.void
setMetaDescription
(LocalizedString metaDescription) Maps toCategory.metaDescription
.void
setMetaKeywords
(LocalizedString metaKeywords) Maps toCategory.metaKeywords
.void
setMetaTitle
(LocalizedString metaTitle) Maps toCategory.metaTitle
.void
setName
(LocalizedString name) Maps toCategory.name
.void
setOrderHint
(String orderHint) Maps toCategory.orderHint
.void
setParent
(CategoryKeyReference parent) Maps toCategory.parent
.void
setSlug
(LocalizedString slug) Maps toCategory.slug
.static com.fasterxml.jackson.core.type.TypeReference<CategoryImport>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCategoryImport
(Function<CategoryImport, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.common.ImportResource
withImportResource
-
Method Details
-
getKey
User-defined unique identifier. If a Category with this
key
exists, it will be updated with the imported data.- Specified by:
getKey
in interfaceImportResource
- Returns:
- key
-
getName
Maps to
Category.name
.- Returns:
- name
-
getSlug
Maps to
Category.slug
. Must match the pattern[-a-zA-Z0-9_]{2,256}
.- Returns:
- slug
-
getDescription
Maps to
Category.description
.- Returns:
- description
-
getParent
Maps to
Category.parent
. The Reference to the parent Category with which the Category is associated. If referenced Category does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Category is created.- Returns:
- parent
-
getOrderHint
String getOrderHint()Maps to
Category.orderHint
.- Returns:
- orderHint
-
getExternalId
String getExternalId()Maps to
Category.externalId
.- Returns:
- externalId
-
getMetaTitle
Maps to
Category.metaTitle
.- Returns:
- metaTitle
-
getMetaDescription
Maps to
Category.metaDescription
.- Returns:
- metaDescription
-
getMetaKeywords
Maps to
Category.metaKeywords
.- Returns:
- metaKeywords
-
getAssets
- Returns:
- assets
-
getCustom
The custom fields for this Category.
- Returns:
- custom
-
setKey
User-defined unique identifier. If a Category with this
key
exists, it will be updated with the imported data.- Specified by:
setKey
in interfaceImportResource
- Parameters:
key
- value to be set
-
setName
Maps to
Category.name
.- Parameters:
name
- value to be set
-
setSlug
Maps to
Category.slug
. Must match the pattern[-a-zA-Z0-9_]{2,256}
.- Parameters:
slug
- value to be set
-
setDescription
Maps to
Category.description
.- Parameters:
description
- value to be set
-
setParent
Maps to
Category.parent
. The Reference to the parent Category with which the Category is associated. If referenced Category does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Category is created.- Parameters:
parent
- value to be set
-
setOrderHint
Maps to
Category.orderHint
.- Parameters:
orderHint
- value to be set
-
setExternalId
Maps to
Category.externalId
.- Parameters:
externalId
- value to be set
-
setMetaTitle
Maps to
Category.metaTitle
.- Parameters:
metaTitle
- value to be set
-
setMetaDescription
Maps to
Category.metaDescription
.- Parameters:
metaDescription
- value to be set
-
setMetaKeywords
Maps to
Category.metaKeywords
.- Parameters:
metaKeywords
- value to be set
-
setAssets
set assets- Parameters:
assets
- values to be set
-
setAssets
set assets- Parameters:
assets
- values to be set
-
setCustom
The custom fields for this Category.
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of CategoryImport
-
of
factory method to create a shallow copy CategoryImport- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CategoryImport- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CategoryImport- Returns:
- builder
-
builder
create builder for CategoryImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCategoryImport
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-