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