Class LocalizableTextAttributeBuilder
- All Implemented Interfaces:
Builder<LocalizableTextAttribute>
Example to create an instance using the builder pattern
LocalizableTextAttribute localizableTextAttribute = LocalizableTextAttribute.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds LocalizableTextAttribute with checking for non-null required valuesbuilds LocalizableTextAttribute without checking for non-null required valuesgetName()
The name of this attribute must match a name of the product types attribute definitions.getValue()
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.The name of this attribute must match a name of the product types attribute definitions.of()
factory method for an instance of LocalizableTextAttributeBuilderof
(LocalizableTextAttribute template) create builder for LocalizableTextAttribute instancevalue
(LocalizedString value) 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.
-
Constructor Details
-
LocalizableTextAttributeBuilder
public LocalizableTextAttributeBuilder()
-
-
Method Details
-
name
The name of this attribute must match a name of the product types attribute definitions. The name is required if this type is used in a product variant and must not be set when used in a product variant patch.
- Parameters:
name
- value to be set- Returns:
- Builder
-
value
public LocalizableTextAttributeBuilder value(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) 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" }
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
withValue
public LocalizableTextAttributeBuilder withValue(Function<LocalizedStringBuilder, LocalizedString> builder) 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" }
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
value
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" }
- Parameters:
value
- value to be set- Returns:
- Builder
-
getName
The name of this attribute must match a name of the product types attribute definitions. The name is required if this type is used in a product variant and must not be set when used in a product variant patch.
- Returns:
- name
-
getValue
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" }
- Returns:
- value
-
build
builds LocalizableTextAttribute with checking for non-null required values- Specified by:
build
in interfaceBuilder<LocalizableTextAttribute>
- Returns:
- LocalizableTextAttribute
-
buildUnchecked
builds LocalizableTextAttribute without checking for non-null required values- Returns:
- LocalizableTextAttribute
-
of
factory method for an instance of LocalizableTextAttributeBuilder- Returns:
- builder
-
of
create builder for LocalizableTextAttribute instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-