Class ProductCatalogDataBuilder
java.lang.Object
com.commercetools.api.models.product.ProductCatalogDataBuilder
- All Implemented Interfaces:
Builder<ProductCatalogData>
ProductCatalogDataBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductCatalogData productCatalogData = ProductCatalogData.builder()
.published(true)
.current(currentBuilder -> currentBuilder)
.staged(stagedBuilder -> stagedBuilder)
.hasStagedChanges(true)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds ProductCatalogData with checking for non-null required valuesbuilds ProductCatalogData without checking for non-null required valuescurrent(ProductData current) Current (published) data of the Product.current(Function<ProductDataBuilder, ProductDataBuilder> builder) Current (published) data of the Product.Current (published) data of the Product.Whether thestageddata is different from thecurrentdata.Whether thecurrentrepresentation of the Product is retrievable in the Product Projection endpoints and indexed for Product Search.Staged (unpublished) data of the Product.hasStagedChanges(Boolean hasStagedChanges) Whether thestageddata is different from thecurrentdata.static ProductCatalogDataBuilderof()factory method for an instance of ProductCatalogDataBuilderstatic ProductCatalogDataBuilderof(ProductCatalogData template) create builder for ProductCatalogData instanceWhether thecurrentrepresentation of the Product is retrievable in the Product Projection endpoints and indexed for Product Search.staged(ProductData staged) Staged (unpublished) data of the Product.staged(Function<ProductDataBuilder, ProductDataBuilder> builder) Staged (unpublished) data of the Product.withCurrent(Function<ProductDataBuilder, ProductData> builder) Current (published) data of the Product.withStaged(Function<ProductDataBuilder, ProductData> builder) Staged (unpublished) data of the Product.
-
Constructor Details
-
ProductCatalogDataBuilder
public ProductCatalogDataBuilder()
-
-
Method Details
-
published
Whether the
currentrepresentation of the Product is retrievable in the Product Projection endpoints and indexed for Product Search.- Parameters:
published- value to be set- Returns:
- Builder
-
current
Current (published) data of the Product.
- Parameters:
builder- function to build the current value- Returns:
- Builder
-
withCurrent
Current (published) data of the Product.
- Parameters:
builder- function to build the current value- Returns:
- Builder
-
current
Current (published) data of the Product.
- Parameters:
current- value to be set- Returns:
- Builder
-
staged
Staged (unpublished) data of the Product.
- Parameters:
builder- function to build the staged value- Returns:
- Builder
-
withStaged
Staged (unpublished) data of the Product.
- Parameters:
builder- function to build the staged value- Returns:
- Builder
-
staged
Staged (unpublished) data of the Product.
- Parameters:
staged- value to be set- Returns:
- Builder
-
hasStagedChanges
Whether the
stageddata is different from thecurrentdata.- Parameters:
hasStagedChanges- value to be set- Returns:
- Builder
-
getPublished
Whether the
currentrepresentation of the Product is retrievable in the Product Projection endpoints and indexed for Product Search.- Returns:
- published
-
getCurrent
Current (published) data of the Product.
- Returns:
- current
-
getStaged
Staged (unpublished) data of the Product.
- Returns:
- staged
-
getHasStagedChanges
Whether the
stageddata is different from thecurrentdata.- Returns:
- hasStagedChanges
-
build
builds ProductCatalogData with checking for non-null required values- Specified by:
buildin interfaceBuilder<ProductCatalogData>- Returns:
- ProductCatalogData
-
buildUnchecked
builds ProductCatalogData without checking for non-null required values- Returns:
- ProductCatalogData
-
of
factory method for an instance of ProductCatalogDataBuilder- Returns:
- builder
-
of
create builder for ProductCatalogData instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-