Update the operation type string. 40/134640/1
authorChuanyuChen <chenchuanyu@huawei.com>
Thu, 25 May 2023 06:29:36 +0000 (14:29 +0800)
committerChuanyuChen <chenchuanyu@huawei.com>
Thu, 25 May 2023 06:29:36 +0000 (14:29 +0800)
Update the operation type string.

Issue-ID: USECASEUI-794

Signed-off-by: ChuanyuChen <chenchuanyu@huawei.com>
Change-Id: Ie56b0e89b8e516dd532db3e628fd008555ddad3c

intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/adapters/dcae/dmaap/DCAENotificationCallback.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/adapters/policy/dmaap/PolicyNotificationCallback.java

index 3c387a1..c35b2fa 100644 (file)
@@ -32,6 +32,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 public class DCAENotificationCallback implements NotificationCallback {
     private static final Logger logger = LoggerFactory.getLogger(DCAENotificationCallback.class);
 
+    private static final String IntentOperation = "Assurance";
+
     @Autowired
     ComponentNotificationService componentNotificationService;
 
@@ -40,7 +42,7 @@ public class DCAENotificationCallback implements NotificationCallback {
         logger.info("Received event from DCAE: \n" + msg);
         NotificationEventModel event = (new Gson()).fromJson(msg, NotificationEventModel.class);
         FulfillmentOperation info = new FulfillmentOperation();
-        info.setOperation(event.getEntity().getOperation());
+        info.setOperation(IntentOperation);
         info.setFulfillmentStatus(FulfillmentStatus.NOT_FULFILLED);
         List<String> instances = new ArrayList<>();
         instances.add(event.getEntity().getId());
index 429f952..2230574 100644 (file)
@@ -32,6 +32,8 @@ public class PolicyNotificationCallback implements NotificationCallback {
 
     private static final Logger logger = LoggerFactory.getLogger(PolicyNotificationCallback.class);
 
+    //only Assurance support . Delivery will be supported next release.
+    private static final String IntentOperation = "Assurance";
     @Autowired
     ComponentNotificationService componentNotificationService;
 
@@ -40,7 +42,7 @@ public class PolicyNotificationCallback implements NotificationCallback {
         logger.info("Received event from Policy: \n" + msg);
         NotificationEventModel event = (new Gson()).fromJson(msg, NotificationEventModel.class);
         FulfillmentOperation info = new FulfillmentOperation();
-        info.setOperation(event.getEntity().getOperation());
+        info.setOperation(IntentOperation);
         info.setFulfillmentStatus(FulfillmentStatus.NOT_FULFILLED);
         List<String> instances = new ArrayList<>();
         instances.add(event.getEntity().getId());