Class CategoryDraftBuilder
- All Implemented Interfaces:
Builder<CategoryDraft>
Example to create an instance using the builder pattern
CategoryDraft categoryDraft = CategoryDraft.builder()
.name(nameBuilder -> nameBuilder)
.slug(slugBuilder -> slugBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAssets
(Function<AssetDraftBuilder, AssetDraft> builder) Media related to the Category.assets
(AssetDraft... assets) Media related to the Category.assets
(List<AssetDraft> assets) Media related to the Category.build()
builds CategoryDraft with checking for non-null required valuesbuilds CategoryDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields for the Category.Custom Fields for the Category.description
(LocalizedString description) Description of the Category.Description of the Category.externalId
(String externalId) Additional identifier for external systems like customer relationship management (CRM) or enterprise resource planning (ERP).Media related to the Category.Custom Fields for the Category.Description of the Category.Additional identifier for external systems like customer relationship management (CRM) or enterprise resource planning (ERP).getKey()
User-defined unique identifier for the Category.Description of the Category used by external search engines for improved search engine performance.Keywords related to the Category for improved search engine performance.Name of the Category used by external search engines for improved search engine performance.getName()
Name of the Category.Decimal value between 0 and 1.Parent Category of the Category.getSlug()
User-defined identifier used as a deep-link URL to the related Category.User-defined unique identifier for the Category.metaDescription
(LocalizedString metaDescription) Description of the Category used by external search engines for improved search engine performance.Description of the Category used by external search engines for improved search engine performance.metaKeywords
(LocalizedString metaKeywords) Keywords related to the Category for improved search engine performance.Keywords related to the Category for improved search engine performance.metaTitle
(LocalizedString metaTitle) Name of the Category used by external search engines for improved search engine performance.Name of the Category used by external search engines for improved search engine performance.name
(LocalizedString name) Name of the Category.Name of the Category.static CategoryDraftBuilder
of()
factory method for an instance of CategoryDraftBuilderstatic CategoryDraftBuilder
of
(CategoryDraft template) create builder for CategoryDraft instanceDecimal value between 0 and 1.parent
(CategoryResourceIdentifier parent) Parent Category of the Category.Parent Category of the Category.plusAssets
(AssetDraft... assets) Media related to the Category.plusAssets
(Function<AssetDraftBuilder, AssetDraftBuilder> builder) Media related to the Category.setAssets
(Function<AssetDraftBuilder, AssetDraft> builder) Media related to the Category.slug
(LocalizedString slug) User-defined identifier used as a deep-link URL to the related Category.User-defined identifier used as a deep-link URL to the related Category.withAssets
(Function<AssetDraftBuilder, AssetDraftBuilder> builder) Media related to the Category.Custom Fields for the Category.Description of the Category.Description of the Category used by external search engines for improved search engine performance.Keywords related to the Category for improved search engine performance.Name of the Category used by external search engines for improved search engine performance.Name of the Category.Parent Category of the Category.User-defined identifier used as a deep-link URL to the related Category.
-
Constructor Details
-
CategoryDraftBuilder
public CategoryDraftBuilder()
-
-
Method Details
-
name
Name of the Category.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
Name of the Category.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the Category.
- Parameters:
name
- value to be set- Returns:
- Builder
-
slug
User-defined identifier used as a deep-link URL to the related Category. A Category can have the same slug for different Locales, but it must be unique across the Project. Valid slugs must match the pattern
^[A-Za-z0-9_-]{2,256}+$
.- Parameters:
builder
- function to build the slug value- Returns:
- Builder
-
withSlug
User-defined identifier used as a deep-link URL to the related Category. A Category can have the same slug for different Locales, but it must be unique across the Project. Valid slugs must match the pattern
^[A-Za-z0-9_-]{2,256}+$
.- Parameters:
builder
- function to build the slug value- Returns:
- Builder
-
slug
User-defined identifier used as a deep-link URL to the related Category. A Category can have the same slug for different Locales, but it must be unique across the Project. Valid slugs must match the pattern
^[A-Za-z0-9_-]{2,256}+$
.- Parameters:
slug
- value to be set- Returns:
- Builder
-
description
public CategoryDraftBuilder description(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Description of the Category.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
withDescription
public CategoryDraftBuilder withDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Description of the Category.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
description
Description of the Category.
- Parameters:
description
- value to be set- Returns:
- Builder
-
parent
public CategoryDraftBuilder parent(Function<CategoryResourceIdentifierBuilder, CategoryResourceIdentifierBuilder> builder) Parent Category of the Category. The parent can be set by its
id
orkey
.- Parameters:
builder
- function to build the parent value- Returns:
- Builder
-
withParent
public CategoryDraftBuilder withParent(Function<CategoryResourceIdentifierBuilder, CategoryResourceIdentifier> builder) Parent Category of the Category. The parent can be set by its
id
orkey
.- Parameters:
builder
- function to build the parent value- Returns:
- Builder
-
parent
Parent Category of the Category. The parent can be set by its
id
orkey
.- Parameters:
parent
- value to be set- Returns:
- Builder
-
orderHint
Decimal value between 0 and 1. Frontend applications can use this value for ordering Categories within the same level in the category tree. If not set, a random value will be assigned.
- Parameters:
orderHint
- value to be set- Returns:
- Builder
-
externalId
Additional identifier for external systems like customer relationship management (CRM) or enterprise resource planning (ERP).
- Parameters:
externalId
- value to be set- Returns:
- Builder
-
metaTitle
public CategoryDraftBuilder metaTitle(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the Category used by external search engines for improved search engine performance.
- Parameters:
builder
- function to build the metaTitle value- Returns:
- Builder
-
withMetaTitle
Name of the Category used by external search engines for improved search engine performance.
- Parameters:
builder
- function to build the metaTitle value- Returns:
- Builder
-
metaTitle
Name of the Category used by external search engines for improved search engine performance.
- Parameters:
metaTitle
- value to be set- Returns:
- Builder
-
metaDescription
public CategoryDraftBuilder metaDescription(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Description of the Category used by external search engines for improved search engine performance.
- Parameters:
builder
- function to build the metaDescription value- Returns:
- Builder
-
withMetaDescription
public CategoryDraftBuilder withMetaDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Description of the Category used by external search engines for improved search engine performance.
- Parameters:
builder
- function to build the metaDescription value- Returns:
- Builder
-
metaDescription
Description of the Category used by external search engines for improved search engine performance.
- Parameters:
metaDescription
- value to be set- Returns:
- Builder
-
metaKeywords
public CategoryDraftBuilder metaKeywords(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Keywords related to the Category for improved search engine performance.
- Parameters:
builder
- function to build the metaKeywords value- Returns:
- Builder
-
withMetaKeywords
public CategoryDraftBuilder withMetaKeywords(Function<LocalizedStringBuilder, LocalizedString> builder) Keywords related to the Category for improved search engine performance.
- Parameters:
builder
- function to build the metaKeywords value- Returns:
- Builder
-
metaKeywords
Keywords related to the Category for improved search engine performance.
- Parameters:
metaKeywords
- value to be set- Returns:
- Builder
-
custom
public CategoryDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Category.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public CategoryDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the Category.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Category.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
assets
Media related to the Category.
- Parameters:
assets
- value to be set- Returns:
- Builder
-
assets
Media related to the Category.
- Parameters:
assets
- value to be set- Returns:
- Builder
-
plusAssets
Media related to the Category.
- Parameters:
assets
- value to be set- Returns:
- Builder
-
plusAssets
Media related to the Category.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
withAssets
Media related to the Category.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
addAssets
Media related to the Category.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
setAssets
Media related to the Category.
- Parameters:
builder
- function to build the assets value- Returns:
- Builder
-
key
User-defined unique identifier for the Category.
This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Categories with the Import API and the Merchant Center.
- Parameters:
key
- value to be set- Returns:
- Builder
-
getName
Name of the Category.
- Returns:
- name
-
getSlug
User-defined identifier used as a deep-link URL to the related Category. A Category can have the same slug for different Locales, but it must be unique across the Project. Valid slugs must match the pattern
^[A-Za-z0-9_-]{2,256}+$
.- Returns:
- slug
-
getDescription
Description of the Category.
- Returns:
- description
-
getParent
Parent Category of the Category. The parent can be set by its
id
orkey
.- Returns:
- parent
-
getOrderHint
Decimal value between 0 and 1. Frontend applications can use this value for ordering Categories within the same level in the category tree. If not set, a random value will be assigned.
- Returns:
- orderHint
-
getExternalId
Additional identifier for external systems like customer relationship management (CRM) or enterprise resource planning (ERP).
- Returns:
- externalId
-
getMetaTitle
Name of the Category used by external search engines for improved search engine performance.
- Returns:
- metaTitle
-
getMetaDescription
Description of the Category used by external search engines for improved search engine performance.
- Returns:
- metaDescription
-
getMetaKeywords
Keywords related to the Category for improved search engine performance.
- Returns:
- metaKeywords
-
getCustom
Custom Fields for the Category.
- Returns:
- custom
-
getAssets
Media related to the Category.
- Returns:
- assets
-
getKey
User-defined unique identifier for the Category.
This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Categories with the Import API and the Merchant Center.
- Returns:
- key
-
build
builds CategoryDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<CategoryDraft>
- Returns:
- CategoryDraft
-
buildUnchecked
builds CategoryDraft without checking for non-null required values- Returns:
- CategoryDraft
-
of
factory method for an instance of CategoryDraftBuilder- Returns:
- builder
-
of
create builder for CategoryDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-