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