Interface DeliveryPayload
- All Superinterfaces:
SubscriptionNotification
- All Known Subinterfaces:
MessageDelivery
,MessageDeliveryPayload
,ResourceCreatedDelivery
,ResourceCreatedDeliveryPayload
,ResourceDeletedDelivery
,ResourceDeletedDeliveryPayload
,ResourceUpdatedDelivery
,ResourceUpdatedDeliveryPayload
,SubscriptionDelivery
All payloads for the PlatformFormat share these common fields.
Example to create an instance using the builder pattern
DeliveryPayload deliveryPayload = DeliveryPayload.builder()
.projectKey("{projectKey}")
.resource(resourceBuilder -> resourceBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptioncopyDeep()
static DeliveryPayload
deepCopy
(DeliveryPayload template) factory method to create a deep copy of DeliveryPayload@NotNull String
key
of the Project.@NotNull @Valid Reference
Reference to the resource that triggered the notification.@Valid UserProvidedIdentifiers
User-defined unique identifiers of the resource.void
setProjectKey
(String projectKey) key
of the Project.void
setResource
(Reference resource) Reference to the resource that triggered the notification.void
setResourceUserProvidedIdentifiers
(UserProvidedIdentifiers resourceUserProvidedIdentifiers) User-defined unique identifiers of the resource.static com.fasterxml.jackson.core.type.TypeReference<DeliveryPayload>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDeliveryPayload
(Function<DeliveryPayload, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.subscription.SubscriptionNotification
getNotificationType, withSubscriptionNotification
-
Method Details
-
getProjectKey
key
of the Project. Useful for processing notifications if the Destination receives them from multiple Projects.- Returns:
- projectKey
-
getResource
Reference to the resource that triggered the notification.
- Returns:
- resource
-
getResourceUserProvidedIdentifiers
User-defined unique identifiers of the resource.
- Returns:
- resourceUserProvidedIdentifiers
-
setProjectKey
key
of the Project. Useful for processing notifications if the Destination receives them from multiple Projects.- Parameters:
projectKey
- value to be set
-
setResource
Reference to the resource that triggered the notification.
- Parameters:
resource
- value to be set
-
setResourceUserProvidedIdentifiers
User-defined unique identifiers of the resource.
- Parameters:
resourceUserProvidedIdentifiers
- value to be set
-
copyDeep
DeliveryPayload copyDeep()- Specified by:
copyDeep
in interfaceSubscriptionNotification
-
deepCopy
factory method to create a deep copy of DeliveryPayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
withDeliveryPayload
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
-