Class ProductUpdateBuilder
java.lang.Object
com.commercetools.api.models.product.ProductUpdateBuilder
- All Implemented Interfaces:
Builder<ProductUpdate>
ProductUpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductUpdate productUpdate = ProductUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions
(ProductUpdateAction... actions) Update actions to be performed on the Product.actions
(List<ProductUpdateAction> actions) Update actions to be performed on the Product.build()
builds ProductUpdate with checking for non-null required valuesbuilds ProductUpdate without checking for non-null required valuesUpdate actions to be performed on the Product.Expected version of the Product on which the changes should be applied.static ProductUpdateBuilder
of()
factory method for an instance of ProductUpdateBuilderstatic ProductUpdateBuilder
of
(ProductUpdate template) create builder for ProductUpdate instanceplusActions
(ProductUpdateAction... actions) Update actions to be performed on the Product.plusActions
(Function<ProductUpdateActionBuilder, Builder<? extends ProductUpdateAction>> builder) Update actions to be performed on the Product.Expected version of the Product on which the changes should be applied.withActions
(Function<ProductUpdateActionBuilder, Builder<? extends ProductUpdateAction>> builder) Update actions to be performed on the Product.
-
Constructor Details
-
ProductUpdateBuilder
public ProductUpdateBuilder()
-
-
Method Details
-
version
Expected version of the Product on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.
- Parameters:
version
- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the Product.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the Product.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
Update actions to be performed on the Product.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
public ProductUpdateBuilder plusActions(Function<ProductUpdateActionBuilder, Builder<? extends ProductUpdateAction>> builder) Update actions to be performed on the Product.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
withActions
public ProductUpdateBuilder withActions(Function<ProductUpdateActionBuilder, Builder<? extends ProductUpdateAction>> builder) Update actions to be performed on the Product.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
getVersion
Expected version of the Product on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.
- Returns:
- version
-
getActions
Update actions to be performed on the Product.
- Returns:
- actions
-
build
builds ProductUpdate with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductUpdate>
- Returns:
- ProductUpdate
-
buildUnchecked
builds ProductUpdate without checking for non-null required values- Returns:
- ProductUpdate
-
of
factory method for an instance of ProductUpdateBuilder- Returns:
- builder
-
of
create builder for ProductUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-