Class ExtensionTriggerBuilder
java.lang.Object
com.commercetools.api.models.extension.ExtensionTriggerBuilder
- All Implemented Interfaces:
Builder<ExtensionTrigger>
ExtensionTriggerBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ExtensionTrigger extensionTrigger = ExtensionTrigger.builder()
.resourceTypeId(ExtensionResourceTypeId.CART)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions
(ExtensionAction... actions) Create
andUpdate
requests are supported.actions
(List<ExtensionAction> actions) Create
andUpdate
requests are supported.build()
builds ExtensionTrigger with checking for non-null required valuesbuilds ExtensionTrigger without checking for non-null required valuesValid predicate that controls the conditions under which the API Extension is called.Create
andUpdate
requests are supported.Valid predicate that controls the conditions under which the API Extension is called.The resource that triggers the Extension.static ExtensionTriggerBuilder
of()
factory method for an instance of ExtensionTriggerBuilderstatic ExtensionTriggerBuilder
of
(ExtensionTrigger template) create builder for ExtensionTrigger instanceplusActions
(ExtensionAction... actions) Create
andUpdate
requests are supported.resourceTypeId
(ExtensionResourceTypeId resourceTypeId) The resource that triggers the Extension.
-
Constructor Details
-
ExtensionTriggerBuilder
public ExtensionTriggerBuilder()
-
-
Method Details
-
resourceTypeId
The resource that triggers the Extension.
- Parameters:
resourceTypeId
- value to be set- Returns:
- Builder
-
actions
Create
andUpdate
requests are supported.- Parameters:
actions
- value to be set- Returns:
- Builder
-
actions
Create
andUpdate
requests are supported.- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
Create
andUpdate
requests are supported.- Parameters:
actions
- value to be set- Returns:
- Builder
-
condition
Valid predicate that controls the conditions under which the API Extension is called. The Extension is not triggered when the specified condition is not fulfilled.
- Parameters:
condition
- value to be set- Returns:
- Builder
-
getResourceTypeId
The resource that triggers the Extension.
- Returns:
- resourceTypeId
-
getActions
Create
andUpdate
requests are supported.- Returns:
- actions
-
getCondition
Valid predicate that controls the conditions under which the API Extension is called. The Extension is not triggered when the specified condition is not fulfilled.
- Returns:
- condition
-
build
builds ExtensionTrigger with checking for non-null required values- Specified by:
build
in interfaceBuilder<ExtensionTrigger>
- Returns:
- ExtensionTrigger
-
buildUnchecked
builds ExtensionTrigger without checking for non-null required values- Returns:
- ExtensionTrigger
-
of
factory method for an instance of ExtensionTriggerBuilder- Returns:
- builder
-
of
create builder for ExtensionTrigger instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-