Interface ExtensionTrigger
public interface ExtensionTrigger
ExtensionTrigger
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()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionTriggerBuilder
builder()
builder factory method for ExtensionTriggerstatic ExtensionTriggerBuilder
builder
(ExtensionTrigger template) create builder for ExtensionTrigger instancestatic ExtensionTrigger
deepCopy
(ExtensionTrigger template) factory method to create a deep copy of ExtensionTrigger@NotNull List<ExtensionAction>
Create
andUpdate
requests are supported.Valid predicate that controls the conditions under which the API Extension is called.@NotNull ExtensionResourceTypeId
The resource that triggers the Extension.static ExtensionTrigger
of()
factory methodstatic ExtensionTrigger
of
(ExtensionTrigger template) factory method to create a shallow copy ExtensionTriggervoid
setActions
(ExtensionAction... actions) Create
andUpdate
requests are supported.void
setActions
(List<ExtensionAction> actions) Create
andUpdate
requests are supported.void
setCondition
(String condition) Valid predicate that controls the conditions under which the API Extension is called.void
setResourceTypeId
(ExtensionResourceTypeId resourceTypeId) The resource that triggers the Extension.static com.fasterxml.jackson.core.type.TypeReference<ExtensionTrigger>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withExtensionTrigger
(Function<ExtensionTrigger, T> helper) accessor map function
-
Method Details
-
getResourceTypeId
The resource that triggers the Extension.
- Returns:
- resourceTypeId
-
getActions
Create
andUpdate
requests are supported.- Returns:
- actions
-
getCondition
String 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
-
setResourceTypeId
The resource that triggers the Extension.
- Parameters:
resourceTypeId
- value to be set
-
setActions
Create
andUpdate
requests are supported.- Parameters:
actions
- values to be set
-
setActions
Create
andUpdate
requests are supported.- Parameters:
actions
- values to be set
-
setCondition
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
-
of
factory method- Returns:
- instance of ExtensionTrigger
-
of
factory method to create a shallow copy ExtensionTrigger- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ExtensionTrigger- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ExtensionTrigger- Returns:
- builder
-
builder
create builder for ExtensionTrigger instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withExtensionTrigger
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-