summaryrefslogtreecommitdiffstats
path: root/cps-service/src/main/java/org/onap/cps/notification/NotificationService.java
diff options
context:
space:
mode:
Diffstat (limited to 'cps-service/src/main/java/org/onap/cps/notification/NotificationService.java')
-rw-r--r--cps-service/src/main/java/org/onap/cps/notification/NotificationService.java12
1 files changed, 5 insertions, 7 deletions
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 7da3a6123..b9d40740e 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
@@ -1,7 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (c) 2021-2022 Bell Canada.
- * Modifications Copyright (C) 2022 Nordix Foundation
+ * Modifications Copyright (C) 2022-2023 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -70,21 +70,19 @@ public class NotificationService {
/**
* Process Data Updated Event and publishes the notification.
*
- * @param dataspaceName dataspaceName
- * @param anchorName anchorName
+ * @param anchor anchor
* @param xpath xpath of changed data node
* @param operation operation
* @param observedTimestamp observedTimestamp
* @return future
*/
@Async("notificationExecutor")
- public Future<Void> processDataUpdatedEvent(final String dataspaceName, final String anchorName,
- final String xpath, final Operation operation, final OffsetDateTime observedTimestamp) {
+ public Future<Void> processDataUpdatedEvent(final Anchor anchor, final String xpath, final Operation operation,
+ final OffsetDateTime observedTimestamp) {
- final Anchor anchor = cpsAdminService.getAnchor(dataspaceName, anchorName);
log.debug("process data updated event for anchor '{}'", anchor);
try {
- if (shouldSendNotification(dataspaceName)) {
+ if (shouldSendNotification(anchor.getDataspaceName())) {
final var cpsDataUpdatedEvent =
cpsDataUpdatedEventFactory.createCpsDataUpdatedEvent(anchor,
observedTimestamp, getRootNodeOperation(xpath, operation));