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