Class VariantUpdateBuilder
java.lang.Object
com.commercetools.api.models.variant.VariantUpdateBuilder
- All Implemented Interfaces:
Builder<VariantUpdate>
VariantUpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
VariantUpdate variantUpdate = VariantUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactions(VariantUpdateAction... actions) Update actions to be performed on the Variant.actions(List<VariantUpdateAction> actions) Update actions to be performed on the Variant.build()builds VariantUpdate with checking for non-null required valuesbuilds VariantUpdate without checking for non-null required valuesUpdate actions to be performed on the Variant.Expected version of the Variant on which the changes should be applied.static VariantUpdateBuilderof()factory method for an instance of VariantUpdateBuilderstatic VariantUpdateBuilderof(VariantUpdate template) create builder for VariantUpdate instanceplusActions(VariantUpdateAction... actions) Update actions to be performed on the Variant.plusActions(Function<VariantUpdateActionBuilder, Builder<? extends VariantUpdateAction>> builder) Update actions to be performed on the Variant.Expected version of the Variant on which the changes should be applied.withActions(Function<VariantUpdateActionBuilder, Builder<? extends VariantUpdateAction>> builder) Update actions to be performed on the Variant.
-
Constructor Details
-
VariantUpdateBuilder
public VariantUpdateBuilder()
-
-
Method Details
-
version
Expected version of the Variant 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 Variant.
- Parameters:
actions- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the Variant.
- Parameters:
actions- value to be set- Returns:
- Builder
-
plusActions
Update actions to be performed on the Variant.
- Parameters:
actions- value to be set- Returns:
- Builder
-
plusActions
public VariantUpdateBuilder plusActions(Function<VariantUpdateActionBuilder, Builder<? extends VariantUpdateAction>> builder) Update actions to be performed on the Variant.
- Parameters:
builder- function to build the actions value- Returns:
- Builder
-
withActions
public VariantUpdateBuilder withActions(Function<VariantUpdateActionBuilder, Builder<? extends VariantUpdateAction>> builder) Update actions to be performed on the Variant.
- Parameters:
builder- function to build the actions value- Returns:
- Builder
-
getVersion
Expected version of the Variant 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 Variant.
- Returns:
- actions
-
build
builds VariantUpdate with checking for non-null required values- Specified by:
buildin interfaceBuilder<VariantUpdate>- Returns:
- VariantUpdate
-
buildUnchecked
builds VariantUpdate without checking for non-null required values- Returns:
- VariantUpdate
-
of
factory method for an instance of VariantUpdateBuilder- Returns:
- builder
-
of
create builder for VariantUpdate instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-