X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fcps%2Fnotification%2FNotificationService.java;h=029efbe7957e1061a607779dd97996ec2703930f;hb=673c6d94830a1677e685cab82a76747a0808d347;hp=4745739a4f89691d33126a27b51850fb77b1a066;hpb=0b0a89eec95e2cb2671bdd393e94fdaa89b9cc66;p=cps.git diff --git a/cps-service/src/main/java/org/onap/cps/notification/NotificationService.java b/cps-service/src/main/java/org/onap/cps/notification/NotificationService.java index 4745739a4..029efbe79 100644 --- a/cps-service/src/main/java/org/onap/cps/notification/NotificationService.java +++ b/cps-service/src/main/java/org/onap/cps/notification/NotificationService.java @@ -20,6 +20,7 @@ package org.onap.cps.notification; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -79,15 +80,17 @@ public class NotificationService { * * @param dataspaceName dataspace name * @param anchorName anchor name + * @param observedTimestamp observedTimestamp * @return future */ @Async("notificationExecutor") - public Future processDataUpdatedEvent(final String dataspaceName, final String anchorName) { + public Future processDataUpdatedEvent(final String dataspaceName, final String anchorName, + final OffsetDateTime observedTimestamp) { log.debug("process data updated event for dataspace '{}' & anchor '{}'", dataspaceName, anchorName); try { if (shouldSendNotification(dataspaceName)) { final var cpsDataUpdatedEvent = - cpsDataUpdatedEventFactory.createCpsDataUpdatedEvent(dataspaceName, anchorName); + cpsDataUpdatedEventFactory.createCpsDataUpdatedEvent(dataspaceName, anchorName, observedTimestamp); log.debug("data updated event to be published {}", cpsDataUpdatedEvent); notificationPublisher.sendNotification(cpsDataUpdatedEvent); }