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