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