Class VariantDataBuilder
- All Implemented Interfaces:
Builder<VariantData>
Example to create an instance using the builder pattern
VariantData variantData = VariantData.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAssets(Function<AssetBuilder, Asset> builder) Media assets of the Variant.addAttributes(Function<AttributeBuilder, Attribute> builder) Attributes of the Variant according to the respective AttributeDefinition.addImages(Function<ImageBuilder, Image> builder) Images of the Variant.Media assets of the Variant.Media assets of the Variant.attributes(Attribute... attributes) Attributes of the Variant according to the respective AttributeDefinition.attributes(List<Attribute> attributes) Attributes of the Variant according to the respective AttributeDefinition.build()builds VariantData with checking for non-null required valuesbuilds VariantData without checking for non-null required valuesMedia assets of the Variant.Attributes of the Variant according to the respective AttributeDefinition.Images of the Variant.getSku()User-defined unique SKU of the Variant.Images of the Variant.Images of the Variant.static VariantDataBuilderof()factory method for an instance of VariantDataBuilderstatic VariantDataBuilderof(VariantData template) create builder for VariantData instanceplusAssets(Asset... assets) Media assets of the Variant.plusAssets(Function<AssetBuilder, AssetBuilder> builder) Media assets of the Variant.plusAttributes(Attribute... attributes) Attributes of the Variant according to the respective AttributeDefinition.Attributes of the Variant according to the respective AttributeDefinition.plusImages(Image... images) Images of the Variant.plusImages(Function<ImageBuilder, ImageBuilder> builder) Images of the Variant.setAssets(Function<AssetBuilder, Asset> builder) Media assets of the Variant.setAttributes(Function<AttributeBuilder, Attribute> builder) Attributes of the Variant according to the respective AttributeDefinition.setImages(Function<ImageBuilder, Image> builder) Images of the Variant.User-defined unique SKU of the Variant.withAssets(Function<AssetBuilder, AssetBuilder> builder) Media assets of the Variant.Attributes of the Variant according to the respective AttributeDefinition.withImages(Function<ImageBuilder, ImageBuilder> builder) Images of the Variant.
-
Constructor Details
-
VariantDataBuilder
public VariantDataBuilder()
-
-
Method Details
-
sku
User-defined unique SKU of the Variant.
- Parameters:
sku- value to be set- Returns:
- Builder
-
images
Images of the Variant.
- Parameters:
images- value to be set- Returns:
- Builder
-
images
Images of the Variant.
- Parameters:
images- value to be set- Returns:
- Builder
-
plusImages
Images of the Variant.
- Parameters:
images- value to be set- Returns:
- Builder
-
plusImages
Images of the Variant.
- Parameters:
builder- function to build the images value- Returns:
- Builder
-
withImages
Images of the Variant.
- Parameters:
builder- function to build the images value- Returns:
- Builder
-
addImages
Images of the Variant.
- Parameters:
builder- function to build the images value- Returns:
- Builder
-
setImages
Images of the Variant.
- Parameters:
builder- function to build the images value- Returns:
- Builder
-
attributes
Attributes of the Variant according to the respective AttributeDefinition.
- Parameters:
attributes- value to be set- Returns:
- Builder
-
attributes
Attributes of the Variant according to the respective AttributeDefinition.
- Parameters:
attributes- value to be set- Returns:
- Builder
-
plusAttributes
Attributes of the Variant according to the respective AttributeDefinition.
- Parameters:
attributes- value to be set- Returns:
- Builder
-
plusAttributes
Attributes of the Variant according to the respective AttributeDefinition.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
withAttributes
Attributes of the Variant according to the respective AttributeDefinition.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
addAttributes
Attributes of the Variant according to the respective AttributeDefinition.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
setAttributes
Attributes of the Variant according to the respective AttributeDefinition.
- Parameters:
builder- function to build the attributes value- Returns:
- Builder
-
assets
Media assets of the Variant.
- Parameters:
assets- value to be set- Returns:
- Builder
-
assets
Media assets of the Variant.
- Parameters:
assets- value to be set- Returns:
- Builder
-
plusAssets
Media assets of the Variant.
- Parameters:
assets- value to be set- Returns:
- Builder
-
plusAssets
Media assets of the Variant.
- Parameters:
builder- function to build the assets value- Returns:
- Builder
-
withAssets
Media assets of the Variant.
- Parameters:
builder- function to build the assets value- Returns:
- Builder
-
addAssets
Media assets of the Variant.
- Parameters:
builder- function to build the assets value- Returns:
- Builder
-
setAssets
Media assets of the Variant.
- Parameters:
builder- function to build the assets value- Returns:
- Builder
-
getSku
User-defined unique SKU of the Variant.
- Returns:
- sku
-
getImages
Images of the Variant.
- Returns:
- images
-
getAttributes
Attributes of the Variant according to the respective AttributeDefinition.
- Returns:
- attributes
-
getAssets
Media assets of the Variant.
- Returns:
- assets
-
build
builds VariantData with checking for non-null required values- Specified by:
buildin interfaceBuilder<VariantData>- Returns:
- VariantData
-
buildUnchecked
builds VariantData without checking for non-null required values- Returns:
- VariantData
-
of
factory method for an instance of VariantDataBuilder- Returns:
- builder
-
of
create builder for VariantData instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-