Class CategoryBuilder
Example to create an instance using the builder pattern
Category category = Category.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.name(nameBuilder -> nameBuilder)
.slug(slugBuilder -> slugBuilder)
.plusAncestors(ancestorsBuilder -> ancestorsBuilder)
.orderHint("{orderHint}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionContains the parent path towards the root Category.addAssets
(Function<AssetBuilder, Asset> builder) Media related to the Category.ancestors
(CategoryReference... ancestors) Contains the parent path towards the root Category.ancestors
(List<CategoryReference> ancestors) Contains the parent path towards the root Category.Media related to the Category.Media related to the Category.build()
builds Category with checking for non-null required valuesbuilds Category without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Category was initially created.IDs and references that created the Category.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the Category.custom
(CustomFields custom) Custom Fields for the Category.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) 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).Contains the parent path towards the root Category.Media related to the Category.Date and time (UTC) the Category was initially created.IDs and references that created 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).getId()
Unique identifier of the Category.getKey()
User-defined unique identifier of the Category.Date and time (UTC) the Category was last updated.IDs and references that last modified 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 this Category.getSlug()
User-defined identifier used as a deep-link URL to the related Category per Locale.Current version of the Category.Unique identifier of the Category.User-defined unique identifier of the Category.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Category was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Category.IDs and references that last modified 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 CategoryBuilder
of()
factory method for an instance of CategoryBuilderstatic CategoryBuilder
create builder for Category instanceDecimal value between 0 and 1.parent
(CategoryReference parent) Parent Category of this Category.Parent Category of this Category.plusAncestors
(CategoryReference... ancestors) Contains the parent path towards the root Category.Contains the parent path towards the root Category.plusAssets
(Asset... assets) Media related to the Category.plusAssets
(Function<AssetBuilder, AssetBuilder> builder) Media related to the Category.Contains the parent path towards the root Category.setAssets
(Function<AssetBuilder, Asset> builder) Media related to the Category.slug
(LocalizedString slug) User-defined identifier used as a deep-link URL to the related Category per Locale.User-defined identifier used as a deep-link URL to the related Category per Locale.Current version of the Category.Contains the parent path towards the root Category.withAssets
(Function<AssetBuilder, AssetBuilder> builder) Media related to the Category.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Category.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields for the Category.Description of the Category.IDs and references that last modified 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 this Category.User-defined identifier used as a deep-link URL to the related Category per Locale.
-
Constructor Details
-
CategoryBuilder
public CategoryBuilder()
-
-
Method Details
-
id
Unique identifier of the Category.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the Category.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Category was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the Category was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
public CategoryBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) IDs and references that last modified the Category.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
IDs and references that last modified the Category.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Category.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the Category.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the Category.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the Category.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
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 per Locale. A Category can have the same slug for different Locales, but they are unique across the Project. Valid slugs match the pattern
^[A-Za-z0-9_-]{2,256}+$
. For good performance, indexes are provided for the first 15languages
set in a Project.- Parameters:
builder
- function to build the slug value- Returns:
- Builder
-
withSlug
User-defined identifier used as a deep-link URL to the related Category per Locale. A Category can have the same slug for different Locales, but they are unique across the Project. Valid slugs match the pattern
^[A-Za-z0-9_-]{2,256}+$
. For good performance, indexes are provided for the first 15languages
set in a Project.- Parameters:
builder
- function to build the slug value- Returns:
- Builder
-
slug
User-defined identifier used as a deep-link URL to the related Category per Locale. A Category can have the same slug for different Locales, but they are unique across the Project. Valid slugs match the pattern
^[A-Za-z0-9_-]{2,256}+$
. For good performance, indexes are provided for the first 15languages
set in a Project.- Parameters:
slug
- value to be set- Returns:
- Builder
-
description
Description of the Category.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
withDescription
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
-
ancestors
Contains the parent path towards the root Category.
- Parameters:
ancestors
- value to be set- Returns:
- Builder
-
ancestors
Contains the parent path towards the root Category.
- Parameters:
ancestors
- value to be set- Returns:
- Builder
-
plusAncestors
Contains the parent path towards the root Category.
- Parameters:
ancestors
- value to be set- Returns:
- Builder
-
plusAncestors
public CategoryBuilder plusAncestors(Function<CategoryReferenceBuilder, CategoryReferenceBuilder> builder) Contains the parent path towards the root Category.
- Parameters:
builder
- function to build the ancestors value- Returns:
- Builder
-
withAncestors
public CategoryBuilder withAncestors(Function<CategoryReferenceBuilder, CategoryReferenceBuilder> builder) Contains the parent path towards the root Category.
- Parameters:
builder
- function to build the ancestors value- Returns:
- Builder
-
addAncestors
Contains the parent path towards the root Category.
- Parameters:
builder
- function to build the ancestors value- Returns:
- Builder
-
setAncestors
Contains the parent path towards the root Category.
- Parameters:
builder
- function to build the ancestors value- Returns:
- Builder
-
parent
Parent Category of this Category.
- Parameters:
builder
- function to build the parent value- Returns:
- Builder
-
withParent
Parent Category of this Category.
- Parameters:
builder
- function to build the parent value- Returns:
- Builder
-
parent
Parent Category of this Category.
- 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.
- 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
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 CategoryBuilder 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 CategoryBuilder 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 CategoryBuilder 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
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
Custom Fields for the Category.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
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 of the Category.
- Parameters:
key
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Category.
- Returns:
- id
-
getVersion
Current version of the Category.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Category was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Category was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Category.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Category.
- Returns:
- createdBy
-
getName
Name of the Category.
- Returns:
- name
-
getSlug
User-defined identifier used as a deep-link URL to the related Category per Locale. A Category can have the same slug for different Locales, but they are unique across the Project. Valid slugs match the pattern
^[A-Za-z0-9_-]{2,256}+$
. For good performance, indexes are provided for the first 15languages
set in a Project.- Returns:
- slug
-
getDescription
Description of the Category.
- Returns:
- description
-
getAncestors
Contains the parent path towards the root Category.
- Returns:
- ancestors
-
getParent
Parent Category of this Category.
- 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.
- 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 of the Category.
- Returns:
- key
-
build
builds Category with checking for non-null required values -
buildUnchecked
builds Category without checking for non-null required values- Returns:
- Category
-
of
factory method for an instance of CategoryBuilder- Returns:
- builder
-
of
create builder for Category instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-