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