Fix references and organize dependencies after splitting 38/139338/4
authoradheli.tavares <adheli.tavares@est.tech>
Mon, 4 Nov 2024 10:17:03 +0000 (10:17 +0000)
committerAdheli Tavares <adheli.tavares@est.tech>
Thu, 7 Nov 2024 10:17:37 +0000 (10:17 +0000)
policy-endpoints and message-bus

Issue-ID: POLICY-5131
Change-Id: I7542caaccc130bc6120cc105d31a1e1e951c8cff
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
88 files changed:
models-base/pom.xml
models-dao/pom.xml
models-decisions/pom.xml
models-errors/pom.xml
models-interactions/model-actors/actor.a1p/pom.xml
models-interactions/model-actors/actor.a1p/src/test/java/org/onap/policy/controlloop/actor/a1p/BasicA1pOperation.java
models-interactions/model-actors/actor.aai/pom.xml
models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java
models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperation.java
models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperation.java
models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/BasicAaiOperation.java
models-interactions/model-actors/actor.appc/pom.xml
models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
models-interactions/model-actors/actor.appclcm/pom.xml
models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java
models-interactions/model-actors/actor.cds/pom.xml
models-interactions/model-actors/actor.sdnc/pom.xml
models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java
models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BasicSdncOperation.java
models-interactions/model-actors/actor.sdnr/pom.xml
models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/BasicSdnrOperation.java
models-interactions/model-actors/actor.so/pom.xml
models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/ModifyCll.java
models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/ModifyNssi.java
models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java
models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java
models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/BasicSoOperation.java
models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java
models-interactions/model-actors/actor.test/pom.xml
models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicActor.java
models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperation.java
models-interactions/model-actors/actor.test/src/test/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperationTest.java
models-interactions/model-actors/actor.vfc/pom.xml
models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/BasicVfcOperation.java
models-interactions/model-actors/actor.xacml/pom.xml
models-interactions/model-actors/actor.xacml/src/main/java/org/onap/policy/controlloop/actor/xacml/DecisionOperation.java
models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/ConfigureOperationTest.java
models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/DecisionOperationTest.java
models-interactions/model-actors/actor.xacml/src/test/java/org/onap/policy/controlloop/actor/xacml/GuardOperationTest.java
models-interactions/model-actors/actorServiceProvider/pom.xml
models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicActor.java
models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java
models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperation.java
models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartial.java
models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/topic/BidirectionalTopicHandler.java
models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/topic/TopicListenerImpl.java
models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicActorTest.java
models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperationTest.java
models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperationTest.java
models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/impl/OperationPartialTest.java
models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/BidirectionalTopicHandlerTest.java
models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/topic/TopicListenerImplTest.java
models-interactions/model-impl/aai/pom.xml
models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java
models-interactions/model-impl/appclcm/pom.xml
models-interactions/model-impl/cds/pom.xml
models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorHandler.java
models-interactions/model-impl/rest/pom.xml
models-interactions/model-impl/sdnc/pom.xml
models-interactions/model-impl/so/pom.xml
models-interactions/model-impl/vfc/pom.xml
models-interactions/model-simulators/pom.xml
models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/AppcLcmTopicServer.java
models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/AppcLegacyTopicServer.java
models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/SdnrTopicServer.java
models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/TopicServer.java
models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/AppcLcmTopicServerTest.java
models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/AppcLegacyTopicServerTest.java
models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/SdnrTopicServerTest.java
models-interactions/model-simulators/src/test/java/org/onap/policy/simulators/TopicServerTest.java
models-interactions/pom.xml
models-pap/pom.xml
models-pdp/pom.xml
models-provider/pom.xml
models-sim/policy-models-sim-pdp/pom.xml
models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorActivator.java
models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/comm/PdpStateChangeListener.java
models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/comm/PdpStatusPublisher.java
models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/comm/PdpUpdateListener.java
models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/handler/PdpUpdateMessageHandler.java
models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/parameters/PdpSimulatorParameterGroup.java
models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpStateChangeListener.java
models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/comm/TestPdpUpdateListener.java
models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/parameters/CommonTestData.java
models-sim/policy-models-sim-pdp/src/test/java/org/onap/policy/models/sim/pdp/parameters/TestPdpSimulatorParameterGroup.java
models-sim/policy-models-simulators/src/main/java/org/onap/policy/models/simulators/ClassRestServerParameters.java
models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java
models-tosca/pom.xml

index 286248f..b94563e 100644 (file)
             <artifactId>policy-models-errors</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>com.google.re2j</groupId>
+            <artifactId>re2j</artifactId>
+        </dependency>
         <dependency>
             <groupId>jakarta.persistence</groupId>
             <artifactId>jakarta.persistence-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-collections4</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
index da32f25..2074b0e 100644 (file)
     </description>
 
     <dependencies>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>common-parameters</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.models</groupId>
             <artifactId>policy-models-base</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>com.google.re2j</groupId>
+            <artifactId>re2j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.persistence</groupId>
+            <artifactId>jakarta.persistence-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>
@@ -53,6 +87,7 @@
         <dependency>
             <groupId>org.hibernate.orm</groupId>
             <artifactId>hibernate-core</artifactId>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
@@ -62,6 +97,7 @@
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-junit-jupiter</artifactId>
+            <scope>test</scope>
         </dependency>
     </dependencies>
 </project>
index a69e0d4..ef6640b 100644 (file)
@@ -37,7 +37,6 @@
             <groupId>org.onap.policy.common</groupId>
             <artifactId>gson</artifactId>
             <version>${policy.common.version}</version>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.models</groupId>
             <version>${policy.common.version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.openpojo</groupId>
             <artifactId>openpojo</artifactId>
index e61bad2..b1c9090 100644 (file)
     <name>${project.artifactId}</name>
     <description>The models for Policy API's to return Error/warning message details.</description>
     <dependencies>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils</artifactId>
+            <version>${policy.common.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils-test</artifactId>
+            <version>${policy.common.version}</version>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>com.google.code.gson</groupId>
             <artifactId>gson</artifactId>
             <artifactId>jakarta.ws.rs-api</artifactId>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.onap.policy.common</groupId>
-            <artifactId>utils</artifactId>
-            <version>${policy.common.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.onap.policy.common</groupId>
-            <artifactId>utils-test</artifactId>
-            <version>${policy.common.version}</version>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>org.assertj</groupId>
             <artifactId>assertj-core</artifactId>
index 3473661..e7cee3a 100644 (file)
@@ -2,7 +2,7 @@
 <!--
   ============LICENSE_START=======================================================
   Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
+  Modifications Copyright (C) 2019-2020, 2023-2024 Nordix Foundation.
   Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
@@ -69,7 +69,7 @@
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
+            <artifactId>message-bus</artifactId>
             <version>${policy.common.version}</version>
             <scope>provided</scope>
         </dependency>
index 6a254a4..6916749 100644 (file)
@@ -30,8 +30,8 @@ import static org.mockito.Mockito.verify;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutionException;
 import java.util.function.BiConsumer;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.coder.StandardCoderObject;
 import org.onap.policy.controlloop.actor.test.BasicBidirectionalTopicOperation;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
index ead9145..0f3d4b5 100644 (file)
@@ -2,7 +2,7 @@
 <!--
   ============LICENSE_START=======================================================
   Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
+  Modifications Copyright (C) 2019-2020, 2023-2024 Nordix Foundation.
   Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
             <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
             <artifactId>actorServiceProvider</artifactId>
             <version>${project.version}</version>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
             <artifactId>aai</artifactId>
             <version>${project.version}</version>
-            <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-            <artifactId>events</artifactId>
+            <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+            <artifactId>actor.test</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.models.policy-models-interactions</groupId>
+            <artifactId>simulators</artifactId>
             <version>${project.version}</version>
-            <scope>provided</scope>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
             <artifactId>policy-endpoints</artifactId>
             <version>${policy.common.version}</version>
-            <scope>provided</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.opentelemetry</groupId>
+                    <artifactId>opentelemetry-context</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.kafka</groupId>
+                    <artifactId>kafka-clients</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
-            <artifactId>actor.test</artifactId>
-            <version>${project.version}</version>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>message-bus</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>common-parameters</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils-test</artifactId>
+            <version>${policy.common.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions</groupId>
-            <artifactId>simulators</artifactId>
-            <version>${project.version}</version>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
index 0f9e2a1..1d9fdf1 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,8 +31,8 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.concurrent.CompletableFuture;
 import org.onap.policy.aai.AaiCqResponse;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
 import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
@@ -83,7 +83,7 @@ public class AaiCustomQueryOperation extends HttpOperation<String> {
         WebTarget web = getClient().getWebTarget().path(path);
         str.append(path);
 
-        web = addQuery(web, str, "?", "format", "resource");
+        web = addQuery(web, str);
 
         Builder webldr = web.request();
         for (Entry<String, Object> header : headers.entrySet()) {
@@ -100,13 +100,13 @@ public class AaiCustomQueryOperation extends HttpOperation<String> {
         return handleResponse(outcome, url, callback -> webldr.async().put(entity, callback));
     }
 
-    private WebTarget addQuery(WebTarget web, StringBuilder str, String separator, String name, String value) {
-        str.append(separator);
-        str.append(name);
+    private WebTarget addQuery(WebTarget web, StringBuilder str) {
+        str.append("?");
+        str.append("format");
         str.append('=');
-        str.append(value);
+        str.append("resource");
 
-        return web.queryParam(name, value);
+        return web.queryParam("format", "resource");
     }
 
     /**
index 519b142..fe3b980 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,8 +28,8 @@ import java.nio.charset.StandardCharsets;
 import java.util.Map;
 import java.util.concurrent.CompletableFuture;
 import org.onap.policy.aai.AaiConstants;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
index b51004f..d1a0449 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,8 +26,8 @@ import jakarta.ws.rs.client.WebTarget;
 import java.util.Map;
 import java.util.concurrent.CompletableFuture;
 import org.onap.policy.aai.AaiConstants;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
index 0b03704..b05080b 100644 (file)
@@ -24,9 +24,9 @@ package org.onap.policy.controlloop.actor.aai;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.Map;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
+import org.onap.policy.common.parameters.topic.BusTopicParams;
 import org.onap.policy.controlloop.actor.test.BasicHttpOperation;
 import org.onap.policy.simulators.Util;
 
index 1bf8fe1..f993e72 100644 (file)
@@ -2,7 +2,7 @@
 <!--
   ============LICENSE_START=======================================================
   Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019, 2023 Nordix Foundation.
+  Modifications Copyright (C) 2019, 2023-2024 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -69,7 +69,7 @@
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
+            <artifactId>message-bus</artifactId>
             <version>${policy.common.version}</version>
             <scope>provided</scope>
         </dependency>
index 45d64db..6a89312 100644 (file)
@@ -36,8 +36,8 @@ import org.onap.policy.appc.Request;
 import org.onap.policy.appc.Response;
 import org.onap.policy.appc.ResponseCode;
 import org.onap.policy.appc.ResponseStatus;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.coder.StandardCoderInstantAsMillis;
 import org.onap.policy.common.utils.coder.StandardCoderObject;
 import org.onap.policy.controlloop.actor.test.BasicBidirectionalTopicOperation;
index 05e7ab9..ad8b551 100644 (file)
@@ -2,7 +2,7 @@
 <!--
   ============LICENSE_START=======================================================
   Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019, 2023 Nordix Foundation.
+  Modifications Copyright (C) 2019, 2023-2024 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -68,7 +68,7 @@
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
+            <artifactId>message-bus</artifactId>
             <version>${policy.common.version}</version>
             <scope>provided</scope>
         </dependency>
index 53677c7..02feae1 100644 (file)
@@ -48,8 +48,8 @@ import org.onap.policy.appclcm.AppcLcmCommonHeader;
 import org.onap.policy.appclcm.AppcLcmMessageWrapper;
 import org.onap.policy.appclcm.AppcLcmOutput;
 import org.onap.policy.appclcm.AppcLcmResponseStatus;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.coder.Coder;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoder;
index 1c87e72..86b487d 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   Copyright (C) 2019 Bell Canada. All rights reserved.
   Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2023 Nordix Foundation.
+  Modifications Copyright (C) 2023-2024 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
-            <artifactId>actor.aai</artifactId>
+            <groupId>org.onap.policy.models.policy-models-interactions</groupId>
+            <artifactId>simulators</artifactId>
             <version>${project.version}</version>
-            <scope>provided</scope>
+            <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-            <artifactId>events</artifactId>
+            <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+            <artifactId>actor.test</artifactId>
             <version>${project.version}</version>
-            <scope>provided</scope>
+            <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions</groupId>
-            <artifactId>simulators</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>common-parameters</artifactId>
+            <version>${policy.common.version}</version>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
+            <artifactId>utils</artifactId>
             <version>${policy.common.version}</version>
-            <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-            <artifactId>aai</artifactId>
-            <version>${project.version}</version>
-            <scope>provided</scope>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils-test</artifactId>
+            <version>${policy.common.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
-            <artifactId>actor.test</artifactId>
-            <version>${project.version}</version>
+            <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
+            <artifactId>blueprint-proto</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.aai.schema-service</groupId>
+            <artifactId>aai-schema</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java-util</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
index 02100a8..c8c5391 100644 (file)
@@ -2,7 +2,7 @@
 <!--
   ============LICENSE_START=======================================================
   Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
+  Modifications Copyright (C) 2019-2020, 2023-2024 Nordix Foundation.
   Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
             <version>${policy.common.version}</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>message-bus</artifactId>
+            <version>${policy.common.version}</version>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
             <artifactId>actor.test</artifactId>
index 20e8cd1..b6991c1 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,8 +27,8 @@ import jakarta.ws.rs.core.Response;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.CompletableFuture;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperation;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
index 5dee02f..797bc4b 100644 (file)
@@ -23,6 +23,7 @@ package org.onap.policy.controlloop.actor.sdnc;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
@@ -30,11 +31,10 @@ import static org.mockito.Mockito.verify;
 
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
 import org.mockito.Mockito;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
+import org.onap.policy.common.parameters.topic.BusTopicParams;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoder;
 import org.onap.policy.controlloop.actor.test.BasicHttpOperation;
@@ -126,7 +126,7 @@ abstract class BasicSdncOperation extends BasicHttpOperation {
 
         outcome = future2.get();
         assertEquals(OperationResult.SUCCESS, outcome.getResult());
-        assertTrue(outcome.getResponse() instanceof SdncResponse);
+        assertInstanceOf(SdncResponse.class, outcome.getResponse());
 
         assertNotNull(outcome.getSubRequestId());
 
index e06d7a6..12225cc 100644 (file)
@@ -2,7 +2,7 @@
 <!--
   ============LICENSE_START=======================================================
   Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
+  Modifications Copyright (C) 2019-2020, 2023-2024 Nordix Foundation.
   Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
+            <artifactId>capabilities</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>message-bus</artifactId>
             <version>${policy.common.version}</version>
             <scope>provided</scope>
         </dependency>
index bd67f7f..d04bcc8 100644 (file)
@@ -29,10 +29,9 @@ import static org.mockito.Mockito.verify;
 
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
 import java.util.function.BiConsumer;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.coder.StandardCoderObject;
 import org.onap.policy.controlloop.actor.test.BasicBidirectionalTopicOperation;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
@@ -123,15 +122,14 @@ abstract class BasicSdnrOperation extends BasicBidirectionalTopicOperation<PciMe
      *
      * @param listener listener to which to provide the response
      * @param code response code
-     * @param description response description
      */
-    protected void provideResponse(BiConsumer<String, StandardCoderObject> listener, int code, String description) {
-        PciResponse response = new PciResponse();
+    protected void provideResponse(BiConsumer<String, StandardCoderObject> listener, int code) {
+        PciResponse pciResponse = new PciResponse();
 
         Status status = new Status();
-        response.setStatus(status);
+        pciResponse.setStatus(status);
         status.setCode(code);
 
-        provideResponse(listener, Util.translate("", response, String.class));
+        provideResponse(listener, Util.translate("", pciResponse, String.class));
     }
 }
index d95b456..31984cd 100644 (file)
@@ -2,7 +2,7 @@
 <!--
   ============LICENSE_START=======================================================
   Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019, 2023 Nordix Foundation.
+  Modifications Copyright (C) 2019, 2023-2024 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
             <version>${policy.common.version}</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>message-bus</artifactId>
+            <version>${policy.common.version}</version>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
             <artifactId>actor.test</artifactId>
index 8b56dee..0744786 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2022 CTC, Inc. and others. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,8 +26,8 @@ import jakarta.ws.rs.core.MediaType;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.CompletableFuture;
-import org.onap.policy.common.endpoints.event.comm.Topic;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
+import org.onap.policy.common.message.bus.event.Topic;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
index ff315a9..01fd532 100644 (file)
@@ -4,7 +4,7 @@
  * ================================================================================
  * Copyright (C) 2020 Wipro Limited.
  * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,8 +27,8 @@ import jakarta.ws.rs.core.MediaType;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.CompletableFuture;
-import org.onap.policy.common.endpoints.event.comm.Topic;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
+import org.onap.policy.common.message.bus.event.Topic;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
index a51be00..65b95cb 100644 (file)
@@ -4,7 +4,7 @@
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2020 Wipro Limited.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,8 +30,8 @@ import java.util.Map;
 import java.util.concurrent.CompletableFuture;
 import org.apache.commons.lang3.tuple.Pair;
 import org.onap.aai.domain.yang.ModelVer;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
index 4ef0a7b..0fa7855 100644 (file)
@@ -39,9 +39,9 @@ import java.util.Map.Entry;
 import java.util.concurrent.CompletableFuture;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.Pair;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
 import org.onap.policy.common.endpoints.http.client.HttpClient;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
@@ -102,7 +102,7 @@ public class VfModuleDelete extends SoOperation {
 
         // @formatter:off
         return handleResponse(outcome, url,
-            callback -> delete(url, headers, MediaType.APPLICATION_JSON, strRequest, callback));
+            callback -> delete(url, headers,  strRequest, callback));
         // @formatter:on
     }
 
@@ -111,21 +111,20 @@ public class VfModuleDelete extends SoOperation {
      * HttpClient, as the JerseyClient does not support it. This will add the content-type
      * and authorization headers, so they should not be included within "headers".
      *
-     * @param uri URI suffix, to be appended to the URI prefix
-     * @param headers headers to be included
-     * @param contentType content type of the request
-     * @param request request to be posted
+     * @param uri      URI suffix, to be appended to the URI prefix
+     * @param headers  headers to be included
+     * @param request  request to be posted
      * @param callback response callbacks
      * @return a future to await the response. Note: it's untested whether canceling this
      *         future will actually cancel the underlying HTTP request
      */
-    protected CompletableFuture<Response> delete(String uri, Map<String, Object> headers, String contentType,
-                    String request, InvocationCallback<Response> callback) {
+    protected CompletableFuture<Response> delete(String uri, Map<String, Object> headers,
+                                                 String request, InvocationCallback<Response> callback) {
 
         final String url = getClient().getBaseUrl() + uri;
 
         var builder = HttpRequest.newBuilder(URI.create(url));
-        builder = builder.header("Content-type", contentType);
+        builder = builder.header("Content-type", MediaType.APPLICATION_JSON);
         builder = addAuthHeader(builder);
 
         for (Entry<String, Object> header : headers.entrySet()) {
index 286ed3c..b74e1bd 100644 (file)
@@ -29,9 +29,9 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import org.mockito.Mock;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
+import org.onap.policy.common.parameters.topic.BusTopicParams;
 import org.onap.policy.controlloop.actor.test.BasicHttpOperation;
 import org.onap.policy.controlloop.actorserviceprovider.TargetType;
 import org.onap.policy.controlloop.actorserviceprovider.Util;
@@ -167,9 +167,9 @@ abstract class BasicSoOperation extends BasicHttpOperation {
         payload.put(SoOperation.REQ_PARAM_NM, Util.translate("", reqParams, String.class));
 
         // config parameters
-        List<Map<String, String>> config = new LinkedList<>();
-        config.add(Collections.emptyMap());
-        payload.put(SoOperation.CONFIG_PARAM_NM, Util.translate("", config, String.class));
+        List<Map<String, String>> configLinkedList = new LinkedList<>();
+        configLinkedList.add(Collections.emptyMap());
+        payload.put(SoOperation.CONFIG_PARAM_NM, Util.translate("", configLinkedList, String.class));
 
         return payload;
     }
index 208db3f..16df582 100644 (file)
@@ -248,7 +248,7 @@ class VfModuleDeleteTest extends BasicSoOperation {
         String reqText = oper.prettyPrint(req);
 
         final CompletableFuture<Response> delFuture =
-            oper.delete("my-uri", headers, MediaType.APPLICATION_JSON, reqText, callback);
+            oper.delete("my-uri", headers, reqText, callback);
 
         ArgumentCaptor<HttpRequest> reqCaptor = ArgumentCaptor.forClass(HttpRequest.class);
         verify(javaClient).sendAsync(reqCaptor.capture(), any());
@@ -290,7 +290,7 @@ class VfModuleDeleteTest extends BasicSoOperation {
         String reqText = oper.prettyPrint(req);
 
         CompletableFuture<Response> delFuture =
-            oper.delete("/my-uri", Map.of(), MediaType.APPLICATION_JSON, reqText, callback);
+            oper.delete("/my-uri", Map.of(), reqText, callback);
 
         assertTrue(delFuture.isCompletedExceptionally());
 
index 1cfe6a1..56a22a0 100644 (file)
@@ -2,7 +2,7 @@
 <!--
   ============LICENSE_START=======================================================
   Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2023 Nordix Foundation.
+  Modifications Copyright (C) 2023-2024 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
 
     <dependencies>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-            <artifactId>aai</artifactId>
+            <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+            <artifactId>actorServiceProvider</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-            <artifactId>events</artifactId>
-            <version>${project.version}</version>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>common-parameters</artifactId>
+            <version>${policy.common.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
-            <artifactId>actorServiceProvider</artifactId>
-            <version>${project.version}</version>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>policy-endpoints</artifactId>
+            <version>${policy.common.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.opentelemetry</groupId>
+                    <artifactId>opentelemetry-context</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.kafka</groupId>
+                    <artifactId>kafka-clients</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
+            <artifactId>message-bus</artifactId>
             <version>${policy.common.version}</version>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions</groupId>
             <artifactId>utils-test</artifactId>
             <version>${policy.common.version}</version>
         </dependency>
+        <dependency>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
index cce4da4..d4457e0 100644 (file)
@@ -28,14 +28,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 import java.io.FileNotFoundException;
 import java.util.Map;
 import lombok.Getter;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
 import org.onap.policy.common.endpoints.http.client.HttpClientConfigException;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
-import org.onap.policy.common.endpoints.parameters.TopicParameterGroup;
+import org.onap.policy.common.message.bus.event.TopicEndpointManager;
 import org.onap.policy.common.parameters.BeanValidationResult;
 import org.onap.policy.common.parameters.BeanValidator;
 import org.onap.policy.common.parameters.annotations.NotNull;
+import org.onap.policy.common.parameters.topic.BusTopicParams;
+import org.onap.policy.common.parameters.topic.TopicParameterGroup;
 import org.onap.policy.common.utils.coder.Coder;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardYamlCoder;
index 3f339d0..420cce8 100644 (file)
@@ -32,13 +32,13 @@ import lombok.NoArgsConstructor;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Captor;
 import org.mockito.Mock;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
-import org.onap.policy.common.endpoints.event.comm.client.BidirectionalTopicClientException;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
-import org.onap.policy.common.endpoints.parameters.TopicParameters;
+import org.onap.policy.common.message.bus.event.TopicEndpointManager;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
+import org.onap.policy.common.message.bus.event.client.BidirectionalTopicClientException;
+import org.onap.policy.common.parameters.topic.TopicParameters;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoderObject;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicConfig;
index 0d04e58..bfdc245 100644 (file)
@@ -39,8 +39,8 @@ import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.coder.StandardCoderObject;
 import org.onap.policy.simulators.TopicServer;
 
index eec1af9..e539712 100644 (file)
             <version>${policy.common.version}</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>message-bus</artifactId>
+            <version>${policy.common.version}</version>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
             <artifactId>actor.test</artifactId>
index 945acab..c8fe20b 100644 (file)
@@ -24,9 +24,9 @@ package org.onap.policy.controlloop.actor.vfc;
 import static org.mockito.Mockito.lenient;
 
 import org.mockito.Mock;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
+import org.onap.policy.common.parameters.topic.BusTopicParams;
 import org.onap.policy.controlloop.actor.test.BasicHttpOperation;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpPollingConfig;
 import org.onap.policy.simulators.Util;
index cedbd95..ff257c0 100644 (file)
@@ -4,7 +4,7 @@
   ONAP
   ================================================================================
   Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2023 Nordix Foundation.
+  Modifications Copyright (C) 2023-2024 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
             <version>${policy.common.version}</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>message-bus</artifactId>
+            <version>${policy.common.version}</version>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
             <artifactId>actor.test</artifactId>
index a490def..f43d892 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,8 +26,8 @@ import jakarta.ws.rs.core.MediaType;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.CompletableFuture;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.controlloop.actorserviceprovider.CallbackManager;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperation;
index 3dba201..1ac60d2 100644 (file)
@@ -37,9 +37,9 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
+import org.onap.policy.common.parameters.topic.BusTopicParams;
 import org.onap.policy.controlloop.actor.test.BasicHttpOperation;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
@@ -47,7 +47,7 @@ import org.onap.policy.models.decisions.concepts.DecisionRequest;
 import org.onap.policy.models.decisions.concepts.DecisionResponse;
 
 @ExtendWith(MockitoExtension.class)
- class ConfigureOperationTest extends BasicHttpOperation {
+class ConfigureOperationTest extends BasicHttpOperation {
 
     @Mock
     private Consumer<OperationOutcome> started;
@@ -61,17 +61,17 @@ import org.onap.policy.models.decisions.concepts.DecisionResponse;
      * Starts the simulator.
      */
     @BeforeAll
-     static void setUpBeforeClass() throws Exception {
+    static void setUpBeforeClass() throws Exception {
         org.onap.policy.simulators.Util.buildXacmlSim();
 
         BusTopicParams clientParams = BusTopicParams.builder().clientName(MY_CLIENT).basePath("policy/pdpx/v1/")
-                        .hostname("localhost").managed(true).port(org.onap.policy.simulators.Util.XACMLSIM_SERVER_PORT)
-                        .build();
+            .hostname("localhost").managed(true).port(org.onap.policy.simulators.Util.XACMLSIM_SERVER_PORT)
+            .build();
         HttpClientFactoryInstance.getClientFactory().build(clientParams);
     }
 
     @AfterAll
-     static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         HttpClientFactoryInstance.getClientFactory().destroy();
         HttpServletServerFactoryInstance.getServerFactory().destroy();
     }
@@ -80,7 +80,7 @@ import org.onap.policy.models.decisions.concepts.DecisionResponse;
      * Sets up.
      */
     @BeforeEach
-     void setUp() {
+    void setUp() {
         super.setUpBasic();
 
         operConfig = mock(DecisionConfig.class);
@@ -102,7 +102,7 @@ import org.onap.policy.models.decisions.concepts.DecisionResponse;
     }
 
     @Test
-     void testConstructor() {
+    void testConstructor() {
         assertEquals(DEFAULT_ACTOR, oper.getActorName());
         assertEquals(DEFAULT_OPERATION, oper.getName());
     }
@@ -111,13 +111,13 @@ import org.onap.policy.models.decisions.concepts.DecisionResponse;
      * Tests "success" case with simulator.
      */
     @Test
-     void testSuccess() throws Exception {
+    void testSuccess() throws Exception {
         DecisionParams opParams =
-                        DecisionParams.builder().clientName(MY_CLIENT).path("decision").action("configure").build();
+            DecisionParams.builder().clientName(MY_CLIENT).path("decision").action("configure").build();
         config = new DecisionConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
 
         params = params.toBuilder().payload(Map.of("policy-id", "test-policy")).retry(0).timeoutSec(5)
-                        .executor(blockingExecutor).build();
+            .executor(blockingExecutor).build();
         oper = new ConfigureOperation(params, config);
 
         outcome = oper.start().get();
@@ -133,13 +133,13 @@ import org.onap.policy.models.decisions.concepts.DecisionResponse;
      * Tests "failure" case with simulator.
      */
     @Test
-     void testFailure() throws Exception {
+    void testFailure() throws Exception {
         DecisionParams opParams =
-                        DecisionParams.builder().clientName(MY_CLIENT).path("decision").action("configure").build();
+            DecisionParams.builder().clientName(MY_CLIENT).path("decision").action("configure").build();
         config = new DecisionConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
 
         params = params.toBuilder().payload(Map.of("policy-id", "nonexistent")).retry(0).timeoutSec(5)
-                        .executor(blockingExecutor).build();
+            .executor(blockingExecutor).build();
         oper = new ConfigureOperation(params, config);
 
         outcome = oper.start().get();
index fa81836..bba06c8 100644 (file)
@@ -46,9 +46,9 @@ import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
+import org.onap.policy.common.parameters.topic.BusTopicParams;
 import org.onap.policy.controlloop.actor.test.BasicHttpOperation;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
@@ -60,7 +60,7 @@ import org.onap.policy.models.decisions.concepts.DecisionResponse;
 import org.onap.policy.simulators.XacmlSimulatorJaxRs;
 
 @ExtendWith(MockitoExtension.class)
- class DecisionOperationTest extends BasicHttpOperation {
+class DecisionOperationTest extends BasicHttpOperation {
     private static final List<String> PROPERTY_NAMES = List.of("prop-A", "prop-B");
 
     @Mock
@@ -75,17 +75,17 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
      * Starts the simulator.
      */
     @BeforeAll
-     static void setUpBeforeClass() throws Exception {
+    static void setUpBeforeClass() throws Exception {
         org.onap.policy.simulators.Util.buildXacmlSim();
 
         BusTopicParams clientParams = BusTopicParams.builder().clientName(MY_CLIENT).basePath("policy/pdpx/v1/")
-                        .hostname("localhost").managed(true).port(org.onap.policy.simulators.Util.XACMLSIM_SERVER_PORT)
-                        .build();
+            .hostname("localhost").managed(true).port(org.onap.policy.simulators.Util.XACMLSIM_SERVER_PORT)
+            .build();
         HttpClientFactoryInstance.getClientFactory().build(clientParams);
     }
 
     @AfterAll
-     static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         HttpClientFactoryInstance.getClientFactory().destroy();
         HttpServletServerFactoryInstance.getServerFactory().destroy();
     }
@@ -94,7 +94,7 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
      * Sets up.
      */
     @BeforeEach
-     void setUp() {
+    void setUp() {
         super.setUpBasic();
 
         guardConfig = mock(DecisionConfig.class);
@@ -119,12 +119,12 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
      * Tests with simulator.
      */
     @Test
-     void testSimulator() throws Exception {
+    void testSimulator() throws Exception {
         DecisionParams opParams = DecisionParams.builder().clientName(MY_CLIENT).path("decision").build();
         config = new DecisionConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
 
         params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor)
-                        .payload(Map.of("clname", XacmlSimulatorJaxRs.DENY_CLNAME)).build();
+            .payload(Map.of("clname", XacmlSimulatorJaxRs.DENY_CLNAME)).build();
         oper = new MyOper(params, config);
 
         outcome = oper.start().get();
@@ -133,18 +133,18 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
     }
 
     @Test
-     void testConstructor() {
+    void testConstructor() {
         assertEquals(DEFAULT_ACTOR, oper.getActorName());
         assertEquals(DEFAULT_OPERATION, oper.getName());
     }
 
     @Test
-     void testGetPropertyNames() {
+    void testGetPropertyNames() {
         assertThat(oper.getPropertyNames()).isEqualTo(PROPERTY_NAMES);
     }
 
     @Test
-     void testStartOperationAsync() throws Exception {
+    void testStartOperationAsync() throws Exception {
         CompletableFuture<OperationOutcome> future2 = oper.start();
         executor.runAll(100);
         assertFalse(future2.isDone());
@@ -171,7 +171,7 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
      * Tests startOperationAsync() when the guard is disabled.
      */
     @Test
-     void testStartOperationAsyncDisabled() throws Exception {
+    void testStartOperationAsyncDisabled() throws Exception {
         // indicate that it's disabled
         when(guardConfig.isDisabled()).thenReturn(true);
 
index f8b53e8..f08c3b8 100644 (file)
@@ -40,9 +40,9 @@ import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
+import org.onap.policy.common.parameters.topic.BusTopicParams;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.controlloop.actor.test.BasicHttpOperation;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
@@ -52,7 +52,7 @@ import org.onap.policy.models.decisions.concepts.DecisionResponse;
 import org.onap.policy.simulators.XacmlSimulatorJaxRs;
 
 @ExtendWith(MockitoExtension.class)
- class GuardOperationTest extends BasicHttpOperation {
+class GuardOperationTest extends BasicHttpOperation {
 
     @Mock
     private Consumer<OperationOutcome> started;
@@ -66,17 +66,17 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
      * Starts the simulator.
      */
     @BeforeAll
-     static void setUpBeforeClass() throws Exception {
+    static void setUpBeforeClass() throws Exception {
         org.onap.policy.simulators.Util.buildXacmlSim();
 
         BusTopicParams clientParams = BusTopicParams.builder().clientName(MY_CLIENT).basePath("policy/pdpx/v1/")
-                        .hostname("localhost").managed(true).port(org.onap.policy.simulators.Util.XACMLSIM_SERVER_PORT)
-                        .build();
+            .hostname("localhost").managed(true).port(org.onap.policy.simulators.Util.XACMLSIM_SERVER_PORT)
+            .build();
         HttpClientFactoryInstance.getClientFactory().build(clientParams);
     }
 
     @AfterAll
-     static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         HttpClientFactoryInstance.getClientFactory().destroy();
         HttpServletServerFactoryInstance.getServerFactory().destroy();
     }
@@ -85,7 +85,7 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
      * Sets up.
      */
     @BeforeEach
-     void setUp() {
+    void setUp() {
         super.setUpBasic();
 
         guardConfig = mock(DecisionConfig.class);
@@ -110,9 +110,9 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
      * Tests "success" case with simulator.
      */
     @Test
-     void testSuccess() throws Exception {
+    void testSuccess() throws Exception {
         DecisionParams opParams =
-                        DecisionParams.builder().clientName(MY_CLIENT).path("decision").action("guard").build();
+            DecisionParams.builder().clientName(MY_CLIENT).path("decision").action("guard").build();
         config = new DecisionConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
 
         params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
@@ -127,13 +127,13 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
      * Tests "failure" case with simulator.
      */
     @Test
-     void testFailure() throws Exception {
+    void testFailure() throws Exception {
         DecisionParams opParams =
-                        DecisionParams.builder().clientName(MY_CLIENT).path("decision").action("guard").build();
+            DecisionParams.builder().clientName(MY_CLIENT).path("decision").action("guard").build();
         config = new DecisionConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
 
         params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor)
-                        .payload(Map.of("clname", XacmlSimulatorJaxRs.DENY_CLNAME)).build();
+            .payload(Map.of("clname", XacmlSimulatorJaxRs.DENY_CLNAME)).build();
         oper = new GuardOperation(params, config);
 
         outcome = oper.start().get();
@@ -142,18 +142,18 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
     }
 
     @Test
-     void testConstructor() {
+    void testConstructor() {
         assertEquals(DEFAULT_ACTOR, oper.getActorName());
         assertEquals(DEFAULT_OPERATION, oper.getName());
     }
 
     @Test
-     void testGetPropertyNames() {
+    void testGetPropertyNames() {
         assertThat(oper.getPropertyNames()).isEmpty();
     }
 
     @Test
-     void testMakeRequest() throws CoderException {
+    void testMakeRequest() throws CoderException {
         oper.generateSubRequestId(2);
 
         verifyPayload("makeReqStd.json", makePayload());
@@ -182,7 +182,7 @@ import org.onap.policy.simulators.XacmlSimulatorJaxRs;
     }
 
     @Test
-     void testPostProcessResponse() {
+    void testPostProcessResponse() {
         DecisionResponse response = new DecisionResponse();
 
         // null status
index 68042f2..f139178 100644 (file)
     <dependencies>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-            <artifactId>aai</artifactId>
+            <artifactId>events</artifactId>
             <version>${project.version}</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-            <artifactId>events</artifactId>
-            <version>${project.version}</version>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>capabilities</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>common-parameters</artifactId>
+            <version>${policy.common.version}</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>gson</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
             <artifactId>policy-endpoints</artifactId>
             <version>${policy.common.version}</version>
             <scope>provided</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.opentelemetry</groupId>
+                    <artifactId>opentelemetry-context</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.kafka</groupId>
+                    <artifactId>kafka-clients</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>message-bus</artifactId>
+            <version>${policy.common.version}</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
             <artifactId>utils-test</artifactId>
             <version>${policy.common.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
index 564bbc3..689622d 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,7 +25,7 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.function.Function;
 import org.apache.commons.lang3.tuple.Pair;
-import org.onap.policy.common.endpoints.event.comm.client.BidirectionalTopicClientException;
+import org.onap.policy.common.message.bus.event.client.BidirectionalTopicClientException;
 import org.onap.policy.controlloop.actorserviceprovider.Util;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicActorParams;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicParams;
index 8f2199f..7b87e25 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,7 +25,7 @@ import java.util.List;
 import java.util.concurrent.CompletableFuture;
 import java.util.function.BiConsumer;
 import lombok.Getter;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoderObject;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
index 1e11bce..90dfdb9 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,10 +31,10 @@ import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.function.Function;
 import lombok.Getter;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
 import org.onap.policy.common.endpoints.http.client.HttpClient;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
index c19ad6c..90ac49c 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2022 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -42,9 +43,9 @@ import java.util.function.UnaryOperator;
 import lombok.AccessLevel;
 import lombok.Getter;
 import lombok.Setter;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.common.utils.coder.Coder;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoder;
index 30ee1e2..6ee9059 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,8 +22,8 @@
 package org.onap.policy.controlloop.actorserviceprovider.topic;
 
 import java.util.List;
-import org.onap.policy.common.endpoints.event.comm.client.BidirectionalTopicClient;
-import org.onap.policy.common.endpoints.event.comm.client.BidirectionalTopicClientException;
+import org.onap.policy.common.message.bus.event.client.BidirectionalTopicClient;
+import org.onap.policy.common.message.bus.event.client.BidirectionalTopicClientException;
 
 /**
  * Handler for a bidirectional topic, supporting both publishing and forwarding of
index 93beab1..95b0ab7 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,8 +25,8 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.event.comm.TopicListener;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.TopicListener;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoder;
 import org.onap.policy.common.utils.coder.StandardCoderObject;
@@ -33,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * A topic listener. When a message arrives on a topic, it is forwarded to listeners based
+ * A topic listener. When a message arrives at a topic, it is forwarded to listeners based
  * on the content of fields found within the message. However, depending on the message
  * type, the relevant fields might be found in different places within the message's
  * object hierarchy. For each different list of keys, this class maintains a
index 7e4543e..8f0b42b 100644 (file)
@@ -42,8 +42,8 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
-import org.onap.policy.common.endpoints.event.comm.client.BidirectionalTopicClientException;
+import org.onap.policy.common.message.bus.event.TopicEndpointManager;
+import org.onap.policy.common.message.bus.event.client.BidirectionalTopicClientException;
 import org.onap.policy.controlloop.actorserviceprovider.Util;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicActorParams;
 import org.onap.policy.controlloop.actorserviceprovider.parameters.ParameterValidationRuntimeException;
index 67283f5..bb2d7f9 100644 (file)
@@ -35,7 +35,6 @@ import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.CompletableFuture;
@@ -51,7 +50,7 @@ import org.mockito.Captor;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
 import org.onap.policy.common.utils.coder.Coder;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoder;
@@ -142,7 +141,7 @@ class BidirectionalTopicOperationTest {
         CompletableFuture<OperationOutcome> future = oper.startOperationAsync(1, outcome);
         assertFalse(future.isDone());
 
-        verify(forwarder).register(eq(Arrays.asList(REQ_ID)), listenerCaptor.capture());
+        verify(forwarder).register(eq(List.of(REQ_ID)), listenerCaptor.capture());
 
         verify(forwarder, never()).unregister(any(), any());
 
@@ -167,7 +166,7 @@ class BidirectionalTopicOperationTest {
         assertEquals(OperationResult.SUCCESS, outcome.getResult());
         assertEquals(response, outcome.getResponse());
 
-        verify(forwarder).unregister(Arrays.asList(REQ_ID), listenerCaptor.getValue());
+        verify(forwarder).unregister(List.of(REQ_ID), listenerCaptor.getValue());
     }
 
     /**
@@ -186,7 +185,7 @@ class BidirectionalTopicOperationTest {
         CompletableFuture<OperationOutcome> future = oper.startOperationAsync(1, outcome);
         assertFalse(future.isDone());
 
-        verify(forwarder).register(eq(Arrays.asList(REQ_ID)), listenerCaptor.capture());
+        verify(forwarder).register(eq(List.of(REQ_ID)), listenerCaptor.capture());
 
         verify(forwarder, never()).unregister(any(), any());
 
@@ -195,7 +194,7 @@ class BidirectionalTopicOperationTest {
         assertTrue(executor.runAll(MAX_REQUESTS));
         assertTrue(future.isCompletedExceptionally());
 
-        verify(forwarder).unregister(Arrays.asList(REQ_ID), listenerCaptor.getValue());
+        verify(forwarder).unregister(List.of(REQ_ID), listenerCaptor.getValue());
     }
 
     /**
@@ -208,10 +207,10 @@ class BidirectionalTopicOperationTest {
 
         assertThatIllegalStateException().isThrownBy(() -> oper.startOperationAsync(1, outcome));
 
-        verify(forwarder).register(eq(Arrays.asList(REQ_ID)), listenerCaptor.capture());
+        verify(forwarder).register(eq(List.of(REQ_ID)), listenerCaptor.capture());
 
         // must still unregister
-        verify(forwarder).unregister(Arrays.asList(REQ_ID), listenerCaptor.getValue());
+        verify(forwarder).unregister(List.of(REQ_ID), listenerCaptor.getValue());
     }
 
     @Test
@@ -360,7 +359,7 @@ class BidirectionalTopicOperationTest {
     }
 
 
-    private class MyStringOperation extends BidirectionalTopicOperation<String, String> {
+    private static class MyStringOperation extends BidirectionalTopicOperation<String, String> {
 
         MyStringOperation(ControlLoopOperationParams params, BidirectionalTopicConfig config) {
             super(params, config, String.class, Collections.emptyList());
@@ -373,7 +372,7 @@ class BidirectionalTopicOperationTest {
 
         @Override
         protected List<String> getExpectedKeyValues(int attempt, String request) {
-            return Arrays.asList(REQ_ID);
+            return List.of(REQ_ID);
         }
 
         @Override
@@ -383,7 +382,7 @@ class BidirectionalTopicOperationTest {
     }
 
 
-    private class MyScoOperation extends BidirectionalTopicOperation<MyRequest, StandardCoderObject> {
+    private static class MyScoOperation extends BidirectionalTopicOperation<MyRequest, StandardCoderObject> {
         MyScoOperation(ControlLoopOperationParams params, BidirectionalTopicConfig config) {
             super(params, config, StandardCoderObject.class, Collections.emptyList());
         }
@@ -395,7 +394,7 @@ class BidirectionalTopicOperationTest {
 
         @Override
         protected List<String> getExpectedKeyValues(int attempt, MyRequest request) {
-            return Arrays.asList(REQ_ID);
+            return List.of(REQ_ID);
         }
 
         @Override
@@ -417,7 +416,7 @@ class BidirectionalTopicOperationTest {
 
         @Override
         protected List<String> getExpectedKeyValues(int attempt, MyRequest request) {
-            return Arrays.asList(REQ_ID);
+            return List.of(REQ_ID);
         }
 
         @Override
index 8e1a878..c64903d 100644 (file)
@@ -27,6 +27,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -68,18 +69,17 @@ import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams.TopicParamsBuilder;
 import org.onap.policy.common.endpoints.http.client.HttpClient;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactory;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
 import org.onap.policy.common.endpoints.http.server.HttpServletServer;
 import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
 import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
 import org.onap.policy.common.gson.GsonMessageBodyHandler;
-import org.onap.policy.common.utils.coder.CoderException;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.parameters.topic.BusTopicParams;
+import org.onap.policy.common.parameters.topic.BusTopicParams.TopicParamsBuilder;
 import org.onap.policy.common.utils.network.NetworkUtil;
 import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
 import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
@@ -122,8 +122,8 @@ class HttpOperationTest {
     @Mock
     private Executor executor;
 
-    private ControlLoopOperationParams params;
-    private OperationOutcome outcome;
+    private ControlLoopOperationParams operationParams;
+    private OperationOutcome operationOutcome;
     private AtomicReference<InvocationCallback<Response>> callback;
     private Future<Response> future;
     private HttpConfig config;
@@ -133,7 +133,7 @@ class HttpOperationTest {
      * Starts the simulator.
      */
     @BeforeAll
-   void setUpBeforeClass() throws Exception {
+    void setUpBeforeClass() throws Exception {
         // allocate a port
         int port = NetworkUtil.allocPort();
 
@@ -141,7 +141,7 @@ class HttpOperationTest {
          * Start the simulator. Must use "Properties" to configure it, otherwise the
          * server will use the wrong serialization provider.
          */
-        Properties svrprops = getServerProperties("my-server", port);
+        Properties svrprops = getServerProperties(port);
         HttpServletServerFactoryInstance.getServerFactory().build(svrprops).forEach(HttpServletServer::start);
 
         if (!NetworkUtil.isTcpPortOpen("localhost", port, 100, 100)) {
@@ -157,14 +157,14 @@ class HttpOperationTest {
         HttpClientFactoryInstance.getClientFactory().build(builder.clientName(HTTP_CLIENT).port(port).build());
 
         HttpClientFactoryInstance.getClientFactory()
-                        .build(builder.clientName(HTTP_NO_SERVER).port(NetworkUtil.allocPort()).build());
+            .build(builder.clientName(HTTP_NO_SERVER).port(NetworkUtil.allocPort()).build());
     }
 
     /**
      * Destroys the Http factories and stops the appender.
      */
     @AfterAll
-   static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         HttpClientFactoryInstance.getClientFactory().destroy();
         HttpServletServerFactoryInstance.getServerFactory().destroy();
     }
@@ -174,7 +174,7 @@ class HttpOperationTest {
      * the REST server.
      */
     @BeforeEach
-   void setUp() {
+    void setUp() {
         rejectRequest = false;
         nget = 0;
         npost = 0;
@@ -184,41 +184,42 @@ class HttpOperationTest {
         Mockito.lenient().when(response.readEntity(String.class)).thenReturn(TEXT);
         Mockito.lenient().when(response.getStatus()).thenReturn(200);
 
-        params = ControlLoopOperationParams.builder().actor(ACTOR).operation(OPERATION).requestId(REQ_ID).build();
+        operationParams = ControlLoopOperationParams.builder().actor(ACTOR)
+            .operation(OPERATION).requestId(REQ_ID).build();
 
-        outcome = params.makeOutcome();
+        operationOutcome = operationParams.makeOutcome();
 
         callback = new AtomicReference<>();
         future = new CompletableFuture<>();
 
         Mockito.lenient().when(clientFactory.get(any())).thenReturn(client);
 
-        initConfig(HTTP_CLIENT);
+        initConfig();
 
         oper = new MyGetOperation<>(String.class);
     }
 
     @Test
-   void testHttpOperator() {
+    void testHttpOperator() {
         assertEquals(ACTOR, oper.getActorName());
         assertEquals(OPERATION, oper.getName());
         assertEquals(ACTOR + "." + OPERATION, oper.getFullName());
     }
 
     @Test
-   void testMakeHeaders() {
+    void testMakeHeaders() {
         assertEquals(Collections.emptyMap(), oper.makeHeaders());
     }
 
     @Test
-   void testGetPath() {
+    void testGetPath() {
         assertEquals(PATH, oper.getPath());
     }
 
     @Test
-   void testMakeUrl() {
+    void testMakeUrl() {
         // use a real client
-        initRealConfig(HTTP_CLIENT);
+        initRealConfig();
 
         oper = new MyGetOperation<>(String.class);
 
@@ -226,7 +227,7 @@ class HttpOperationTest {
     }
 
     @Test
-   void testDoConfigureMapOfStringObject_testGetClient_testGetPath_testGetTimeoutMs() {
+    void testDoConfigureMapOfStringObject_testGetClient_testGetPath_testGetTimeoutMs() {
 
         // use value from operator
         assertEquals(1000L, oper.getTimeoutMs(null));
@@ -240,8 +241,8 @@ class HttpOperationTest {
      * Tests handleResponse() when it completes.
      */
     @Test
-   void testHandleResponseComplete() throws Exception {
-        CompletableFuture<OperationOutcome> future2 = oper.handleResponse(outcome, PATH, cb -> {
+    void testHandleResponseComplete() throws Exception {
+        CompletableFuture<OperationOutcome> future2 = oper.handleResponse(operationOutcome, PATH, cb -> {
             callback.set(cb);
             return future;
         });
@@ -250,18 +251,18 @@ class HttpOperationTest {
         assertNotNull(callback.get());
         callback.get().completed(response);
 
-        assertSame(outcome, future2.get(5, TimeUnit.SECONDS));
-        assertSame(TEXT, outcome.getResponse());
+        assertSame(operationOutcome, future2.get(5, TimeUnit.SECONDS));
+        assertSame(TEXT, operationOutcome.getResponse());
 
-        assertEquals(OperationResult.SUCCESS, outcome.getResult());
+        assertEquals(OperationResult.SUCCESS, operationOutcome.getResult());
     }
 
     /**
      * Tests handleResponse() when it fails.
      */
     @Test
-   void testHandleResponseFailed() {
-        CompletableFuture<OperationOutcome> future2 = oper.handleResponse(outcome, PATH, cb -> {
+    void testHandleResponseFailed() {
+        CompletableFuture<OperationOutcome> future2 = oper.handleResponse(operationOutcome, PATH, cb -> {
             callback.set(cb);
             return future;
         });
@@ -282,11 +283,11 @@ class HttpOperationTest {
      */
     @Test
     void testProcessResponseSuccessString() throws Exception {
-        CompletableFuture<OperationOutcome> result = oper.processResponse(outcome, PATH, response);
+        CompletableFuture<OperationOutcome> result = oper.processResponse(operationOutcome, PATH, response);
         assertTrue(result.isDone());
-        assertSame(outcome, result.get());
-        assertEquals(OperationResult.SUCCESS, outcome.getResult());
-        assertSame(TEXT, outcome.getResponse());
+        assertSame(operationOutcome, result.get());
+        assertEquals(OperationResult.SUCCESS, operationOutcome.getResult());
+        assertSame(TEXT, operationOutcome.getResponse());
     }
 
     /**
@@ -295,11 +296,11 @@ class HttpOperationTest {
     @Test
     void testProcessResponseFailure() throws Exception {
         when(response.getStatus()).thenReturn(555);
-        CompletableFuture<OperationOutcome> result = oper.processResponse(outcome, PATH, response);
+        CompletableFuture<OperationOutcome> result = oper.processResponse(operationOutcome, PATH, response);
         assertTrue(result.isDone());
-        assertSame(outcome, result.get());
-        assertEquals(OperationResult.FAILURE, outcome.getResult());
-        assertSame(TEXT, outcome.getResponse());
+        assertSame(operationOutcome, result.get());
+        assertEquals(OperationResult.FAILURE, operationOutcome.getResult());
+        assertSame(TEXT, operationOutcome.getResponse());
     }
 
     /**
@@ -311,11 +312,11 @@ class HttpOperationTest {
 
         MyGetOperation<Integer> oper2 = new MyGetOperation<>(Integer.class);
 
-        CompletableFuture<OperationOutcome> result = oper2.processResponse(outcome, PATH, response);
+        CompletableFuture<OperationOutcome> result = oper2.processResponse(operationOutcome, PATH, response);
         assertTrue(result.isDone());
-        assertSame(outcome, result.get());
-        assertEquals(OperationResult.SUCCESS, outcome.getResult());
-        assertEquals(Integer.valueOf(10), outcome.getResponse());
+        assertSame(operationOutcome, result.get());
+        assertEquals(OperationResult.SUCCESS, operationOutcome.getResult());
+        assertEquals(Integer.valueOf(10), operationOutcome.getResponse());
     }
 
     /**
@@ -325,12 +326,12 @@ class HttpOperationTest {
     void testProcessResponseDecodeExcept() {
         MyGetOperation<Integer> oper2 = new MyGetOperation<>(Integer.class);
 
-        assertThatIllegalArgumentException().isThrownBy(() -> oper2.processResponse(outcome, PATH, response));
+        assertThatIllegalArgumentException().isThrownBy(() -> oper2.processResponse(operationOutcome, PATH, response));
     }
 
     @Test
     void testPostProcessResponse() {
-        assertThatCode(() -> oper.postProcessResponse(outcome, PATH, null, null)).doesNotThrowAnyException();
+        assertThatCode(() -> oper.postProcessResponse(operationOutcome, PATH, null, null)).doesNotThrowAnyException();
     }
 
     @Test
@@ -348,7 +349,7 @@ class HttpOperationTest {
     @Test
     void testGet() throws Exception {
         // use a real client
-        initRealConfig(HTTP_CLIENT);
+        initRealConfig();
 
         MyGetOperation<MyResponse> oper2 = new MyGetOperation<>(MyResponse.class);
 
@@ -356,7 +357,7 @@ class HttpOperationTest {
         assertNotNull(outcome);
         assertEquals(1, nget);
         assertEquals(OperationResult.SUCCESS, outcome.getResult());
-        assertTrue(outcome.getResponse() instanceof MyResponse);
+        assertInstanceOf(MyResponse.class, outcome.getResponse());
     }
 
     /**
@@ -365,7 +366,7 @@ class HttpOperationTest {
     @Test
     void testDelete() throws Exception {
         // use a real client
-        initRealConfig(HTTP_CLIENT);
+        initRealConfig();
 
         MyDeleteOperation oper2 = new MyDeleteOperation();
 
@@ -373,7 +374,7 @@ class HttpOperationTest {
         assertNotNull(outcome);
         assertEquals(1, ndelete);
         assertEquals(OperationResult.SUCCESS, outcome.getResult());
-        assertTrue(outcome.getResponse() instanceof String);
+        assertInstanceOf(String.class, outcome.getResponse());
     }
 
     /**
@@ -382,14 +383,14 @@ class HttpOperationTest {
     @Test
     void testPost() throws Exception {
         // use a real client
-        initRealConfig(HTTP_CLIENT);
+        initRealConfig();
         MyPostOperation oper2 = new MyPostOperation();
 
         OperationOutcome outcome = runOperation(oper2);
         assertNotNull(outcome);
         assertEquals(1, npost);
         assertEquals(OperationResult.SUCCESS, outcome.getResult());
-        assertTrue(outcome.getResponse() instanceof MyResponse);
+        assertInstanceOf(MyResponse.class, outcome.getResponse());
     }
 
     /**
@@ -398,7 +399,7 @@ class HttpOperationTest {
     @Test
     void testPut() throws Exception {
         // use a real client
-        initRealConfig(HTTP_CLIENT);
+        initRealConfig();
 
         MyPutOperation oper2 = new MyPutOperation();
 
@@ -406,7 +407,7 @@ class HttpOperationTest {
         assertNotNull(outcome);
         assertEquals(1, nput);
         assertEquals(OperationResult.SUCCESS, outcome.getResult());
-        assertTrue(outcome.getResponse() instanceof MyResponse);
+        assertInstanceOf(MyResponse.class, outcome.getResponse());
     }
 
     @Test
@@ -417,15 +418,14 @@ class HttpOperationTest {
     /**
      * Gets server properties.
      *
-     * @param name server name
      * @param port server port
      * @return server properties
      */
-    private static Properties getServerProperties(String name, int port) {
+    private static Properties getServerProperties(int port) {
         final Properties props = new Properties();
-        props.setProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES, name);
+        props.setProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES, "my-server");
 
-        final String svcpfx = PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "." + name;
+        final String svcpfx = PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "." + "my-server";
 
         props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_REST_CLASSES_SUFFIX, Server.class.getName());
         props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_HOST_SUFFIX, "localhost");
@@ -434,51 +434,45 @@ class HttpOperationTest {
         props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_SWAGGER_SUFFIX, "false");
 
         props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_SERIALIZATION_PROVIDER,
-                        GsonMessageBodyHandler.class.getName());
+            GsonMessageBodyHandler.class.getName());
         return props;
     }
 
     /**
      * Initializes the configuration.
-     *
-     * @param clientName name of the client which it should use
      */
-    private void initConfig(String clientName) {
-        initConfig(clientName, clientFactory);
+    private void initConfig() {
+        initConfig(clientFactory);
     }
 
     /**
      * Initializes the configuration with a real client.
-     *
-     * @param clientName name of the client which it should use
      */
-    private void initConfig(String clientName, HttpClientFactory factory) {
-        HttpParams params = HttpParams.builder().clientName(clientName).path(PATH).timeoutSec(1).build();
+    private void initConfig(HttpClientFactory factory) {
+        HttpParams params = HttpParams.builder().clientName(HttpOperationTest.HTTP_CLIENT)
+            .path(PATH).timeoutSec(1).build();
         config = new HttpConfig(executor, params, factory);
     }
 
     /**
      * Initializes the configuration with a real client.
-     *
-     * @param clientName name of the client which it should use
      */
-    private void initRealConfig(String clientName) {
-        initConfig(clientName, HttpClientFactoryInstance.getClientFactory());
+    private void initRealConfig() {
+        initConfig(HttpClientFactoryInstance.getClientFactory());
     }
 
     /**
      * Runs the operation.
      *
      * @param operator operator on which to start the operation
-     * @return the outcome of the operation, or {@code null} if it does not complete in
-     *         time
+     * @return the outcome of the operation, or {@code null} if it does not complete in time
      */
     private <T> OperationOutcome runOperation(HttpOperation<T> operator)
-                    throws InterruptedException, ExecutionException, TimeoutException {
+        throws InterruptedException, ExecutionException, TimeoutException {
 
-        CompletableFuture<OperationOutcome> future = operator.start();
+        CompletableFuture<OperationOutcome> completableFuture = operator.start();
 
-        return future.get(5, TimeUnit.SECONDS);
+        return completableFuture.get(5, TimeUnit.SECONDS);
     }
 
     @Getter
@@ -495,7 +489,8 @@ class HttpOperationTest {
 
     private class MyGetOperation<T> extends HttpOperation<T> {
         MyGetOperation(Class<T> responseClass) {
-            super(HttpOperationTest.this.params, HttpOperationTest.this.config, responseClass, Collections.emptyList());
+            super(HttpOperationTest.this.operationParams, HttpOperationTest.this.config,
+                responseClass, Collections.emptyList());
         }
 
         @Override
@@ -509,15 +504,15 @@ class HttpOperationTest {
 
             // @formatter:off
             return handleResponse(outcome, url,
-                callback -> getClient().get(callback, getPath(), headers));
+                invocationCallback -> getClient().get(invocationCallback, getPath(), headers));
             // @formatter:on
         }
     }
 
     private class MyPostOperation extends HttpOperation<MyResponse> {
         MyPostOperation() {
-            super(HttpOperationTest.this.params, HttpOperationTest.this.config, MyResponse.class,
-                            Collections.emptyList());
+            super(HttpOperationTest.this.operationParams, HttpOperationTest.this.config, MyResponse.class,
+                Collections.emptyList());
         }
 
         @Override
@@ -537,15 +532,15 @@ class HttpOperationTest {
 
             // @formatter:off
             return handleResponse(outcome, url,
-                callback -> getClient().post(callback, getPath(), entity, headers));
+                invocationCallback -> getClient().post(invocationCallback, getPath(), entity, headers));
             // @formatter:on
         }
     }
 
     private class MyPutOperation extends HttpOperation<MyResponse> {
         MyPutOperation() {
-            super(HttpOperationTest.this.params, HttpOperationTest.this.config, MyResponse.class,
-                            Collections.emptyList());
+            super(HttpOperationTest.this.operationParams, HttpOperationTest.this.config, MyResponse.class,
+                Collections.emptyList());
         }
 
         @Override
@@ -565,14 +560,15 @@ class HttpOperationTest {
 
             // @formatter:off
             return handleResponse(outcome, url,
-                callback -> getClient().put(callback, getPath(), entity, headers));
+                invocationCallback -> getClient().put(invocationCallback, getPath(), entity, headers));
             // @formatter:on
         }
     }
 
     private class MyDeleteOperation extends HttpOperation<String> {
         MyDeleteOperation() {
-            super(HttpOperationTest.this.params, HttpOperationTest.this.config, String.class, Collections.emptyList());
+            super(HttpOperationTest.this.operationParams, HttpOperationTest.this.config,
+                String.class, Collections.emptyList());
         }
 
         @Override
@@ -586,7 +582,7 @@ class HttpOperationTest {
 
             // @formatter:off
             return handleResponse(outcome, url,
-                callback -> getClient().delete(callback, getPath(), headers));
+                invocationCallback -> getClient().delete(invocationCallback, getPath(), headers));
             // @formatter:on
         }
     }
index d2ca7db..04300c4 100644 (file)
@@ -60,8 +60,8 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.common.utils.coder.Coder;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoder;
@@ -1063,9 +1063,7 @@ class OperationPartialTest {
      * @param expectedCallbacks number of callbacks expected
      * @param expectedOperations number of operation invocations expected
      * @param expectedResult expected outcome
-     * @param manipulator function to modify the future returned by
-     *        {@link OperationPartial#start(ControlLoopOperationParams)} before the tasks
-     *        in the executor are run
+     * @param manipulator function to modify the future returned before the tasks in the executor are run
      */
     private void verifyRun(String testName, int expectedCallbacks, int expectedOperations,
             OperationResult expectedResult, Consumer<CompletableFuture<OperationOutcome>> manipulator) {
index 862e6c4..dcf190b 100644 (file)
@@ -31,17 +31,18 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.util.Arrays;
+import java.util.List;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestInstance;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpoint;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
-import org.onap.policy.common.endpoints.event.comm.client.BidirectionalTopicClientException;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.TopicEndpoint;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
+import org.onap.policy.common.message.bus.event.client.BidirectionalTopicClientException;
 
 @TestInstance(TestInstance.Lifecycle.PER_CLASS)
 @ExtendWith(MockitoExtension.class)
@@ -69,8 +70,8 @@ class BidirectionalTopicHandlerTest {
      */
     @BeforeEach
     void setUp() throws BidirectionalTopicClientException {
-        when(mgr.getTopicSinks(MY_SINK)).thenReturn(Arrays.asList(publisher));
-        when(mgr.getTopicSources(Arrays.asList(MY_SOURCE))).thenReturn(Arrays.asList(subscriber));
+        when(mgr.getTopicSinks(MY_SINK)).thenReturn(List.of(publisher));
+        when(mgr.getTopicSources(List.of(MY_SOURCE))).thenReturn(List.of(subscriber));
 
         when(publisher.getTopicCommInfrastructure()).thenReturn(CommInfrastructure.NOOP);
 
index 3044a1e..8ca49db 100644 (file)
@@ -30,6 +30,7 @@ import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 
 import java.util.Arrays;
+import java.util.List;
 import java.util.Map;
 import java.util.function.BiConsumer;
 import org.junit.jupiter.api.BeforeEach;
@@ -38,7 +39,7 @@ import org.junit.jupiter.api.TestInstance;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoder;
 import org.onap.policy.common.utils.coder.StandardCoderObject;
@@ -86,8 +87,8 @@ class TopicListenerImplTest {
         assertNotNull(forwarder2);
         assertNotSame(forwarder1, forwarder2);
 
-        forwarder1.register(Arrays.asList(VALUEA_REQID), listener1);
-        forwarder1.register(Arrays.asList(VALUEB_REQID), listener1b);
+        forwarder1.register(List.of(VALUEA_REQID), listener1);
+        forwarder1.register(List.of(VALUEB_REQID), listener1b);
         forwarder2.register(Arrays.asList(VALUEA_REQID, VALUEA_SUBREQID), listener2);
     }
 
index 4c5d551..16cd8f7 100644 (file)
     <artifactId>aai</artifactId>
 
     <dependencies>
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.json</groupId>
-            <artifactId>json</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
             <artifactId>utils</artifactId>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
+            <artifactId>message-bus</artifactId>
             <version>${policy.common.version}</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.onap.aai.schema-service</groupId>
             <artifactId>aai-schema</artifactId>
-            <version>1.12.3</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>com.google.code.javaparser</groupId>
-                    <artifactId>javaparser</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.googlecode.json-simple</groupId>
-                    <artifactId>json-simple</artifactId>
-                </exclusion>
-            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>2.3.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
index 26a3987..d7835d2 100644 (file)
@@ -34,9 +34,9 @@ import lombok.AllArgsConstructor;
 import org.apache.commons.lang3.tuple.Pair;
 import org.json.JSONArray;
 import org.json.JSONObject;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoder;
 import org.onap.policy.rest.RestManager;
index d2e7876..a431c89 100644 (file)
             <artifactId>lombok</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>com.openpojo</groupId>
+            <artifactId>openpojo</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
 </project>
index dbe293a..28643b1 100644 (file)
     <description>gRPC client implementation to send process message to CDS blueprint processor gRPC endpoint.
     </description>
 
-    <properties>
-        <grpc.version>1.29.0</grpc.version>
-    </properties>
-
     <dependencies>
         <!-- CDS dependencies -->
         <dependency>
             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
             <artifactId>blueprint-proto</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-stub</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-netty</artifactId>
         </dependency>
         <dependency>
             <groupId>io.grpc</groupId>
             <artifactId>grpc-testing</artifactId>
-            <version>${grpc.version}</version>
-            <scope>test</scope>
         </dependency>
 
         <!-- Policy dependencies -->
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
+            <artifactId>message-bus</artifactId>
             <version>${policy.common.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.common</groupId>
-            <artifactId>utils</artifactId>
-            <version>${policy.common.version}</version>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
         </dependency>
         <dependency>
             <groupId>org.assertj</groupId>
index 6c4d6ca..018deda 100644 (file)
@@ -1,8 +1,9 @@
 /*-
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=============================================================
  * Copyright (C) 2019-2021 Bell Canada.
  * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+ * Modifications Copyright (C) 2024 Nordix Foundation.
+ * ======================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -28,9 +29,9 @@ import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessin
 import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput;
 import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput;
 import org.onap.policy.cds.api.CdsProcessorListener;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
-import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil;
+import org.onap.policy.common.message.bus.utils.NetLoggerUtil.EventType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -59,7 +60,7 @@ public class CdsProcessorHandler {
             @Override
             public void onError(Throwable throwable) {
                 LOGGER.info(LOG_MSG, EventType.IN, CommInfrastructure.REST, url, NetLoggerUtil.SYSTEM_LS,
-                                throwable);
+                                throwable.getMessage());
                 listener.onError(throwable);
                 finishLatch.countDown();
             }
index a249ebb..f882fc4 100644 (file)
             <artifactId>utils</artifactId>
             <version>${policy.common.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>policy-endpoints</artifactId>
+            <version>${policy.common.version}</version>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>com.google.code.gson</groupId>
             <artifactId>gson</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>jakarta.xml.bind</groupId>
+            <artifactId>jakarta.xml.bind-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
             <groupId>org.glassfish.jersey.inject</groupId>
             <artifactId>jersey-hk2</artifactId>
             <version>${version.jersey}</version>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.glassfish.jaxb</groupId>
             <artifactId>jaxb-runtime</artifactId>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
-            <version>${policy.common.version}</version>
-            <scope>test</scope>
         </dependency>
     </dependencies>
 </project>
index accda06..f81ee8e 100644 (file)
             <artifactId>gson</artifactId>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-            <artifactId>rest</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
-            <version>${policy.common.version}</version>
-            <scope>provided</scope>
-        </dependency>
     </dependencies>
 </project>
index 63e22b3..1c2cf0f 100644 (file)
     <artifactId>so</artifactId>
 
     <dependencies>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>gson</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
         <dependency>
             <groupId>com.google.code.gson</groupId>
             <artifactId>gson</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-            <artifactId>rest</artifactId>
-            <version>${project.version}</version>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
-            <version>${policy.common.version}</version>
-            <scope>provided</scope>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
         </dependency>
         <dependency>
             <groupId>org.glassfish.jersey.containers</groupId>
index 20c2eb0..4f33b89 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   Copyright (C) 2017 Intel Corp. All rights reserved.
   Modifications Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019, 2023 Nordix Foundation.
+  Modifications Copyright (C) 2019, 2023-2024 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-            <artifactId>rest</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.onap.policy.common</groupId>
-            <artifactId>policy-endpoints</artifactId>
-            <version>${policy.common.version}</version>
-            <scope>provided</scope>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
         </dependency>
     </dependencies>
 </project>
index 36db43f..3755cee 100644 (file)
             <artifactId>policy-endpoints</artifactId>
             <version>${policy.common.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>message-bus</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
             <artifactId>aai</artifactId>
@@ -81,9 +91,9 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-            <scope>provided</scope>
+            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+            <artifactId>rest</artifactId>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.models</groupId>
             <version>${policy.common.version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.onap.aai.schema-service</groupId>
+            <artifactId>aai-schema</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
+            <artifactId>blueprint-proto</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java-util</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-stub</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty.toolchain</groupId>
+            <artifactId>jetty-jakarta-servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-junit-jupiter</artifactId>
index 62e1acc..d103765 100644 (file)
@@ -22,8 +22,8 @@
 package org.onap.policy.simulators;
 
 import org.onap.policy.appclcm.AppcLcmMessageWrapper;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.coder.StandardCoder;
 import org.onap.policy.common.utils.resources.ResourceUtils;
 
index 9447e01..1c7eaa5 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,8 +22,8 @@
 package org.onap.policy.simulators;
 
 import org.onap.policy.appc.Request;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.coder.StandardCoderInstantAsMillis;
 import org.onap.policy.common.utils.resources.ResourceUtils;
 
index cf297e5..a0e0c73 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,8 +21,8 @@
 
 package org.onap.policy.simulators;
 
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.coder.StandardCoder;
 import org.onap.policy.common.utils.resources.ResourceUtils;
 import org.onap.policy.sdnr.PciMessage;
index 004a2e2..454b6ce 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.simulators;
 
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.event.comm.TopicListener;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.TopicListener;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.coder.Coder;
 import org.onap.policy.common.utils.coder.CoderException;
 
index 48ae2da..dc20355 100644 (file)
@@ -33,9 +33,9 @@ import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.resources.ResourceUtils;
 
 @ExtendWith(MockitoExtension.class)
index d5428db..9e836ac 100644 (file)
@@ -33,9 +33,9 @@ import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.resources.ResourceUtils;
 
 @ExtendWith(MockitoExtension.class)
index 02b9653..019a93a 100644 (file)
@@ -33,9 +33,9 @@ import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.resources.ResourceUtils;
 
 @ExtendWith(MockitoExtension.class)
index a91431e..425e6ae 100644 (file)
@@ -32,9 +32,9 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.coder.StandardCoder;
 
 @ExtendWith(MockitoExtension.class)
index 27464e1..f4680b1 100644 (file)
@@ -1,6 +1,6 @@
 <!--
   ============LICENSE_START=======================================================
-   Copyright (C) 2019 Nordix Foundation.
+   Copyright (C) 2019, 2024 Nordix Foundation.
    Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
@@ -33,6 +33,9 @@
 
     <properties>
         <jacoco.dataFile>${project.basedir}/../../target/code-coverage/jacoco-ut.exec</jacoco.dataFile>
+        <grpc.version>1.29.0</grpc.version>
+        <aai.version>1.12.5</aai.version>
+        <protobuf-java.version>3.10.0</protobuf-java.version>
     </properties>
 
     <modules>
         <module>model-impl</module>
         <module>model-actors</module>
     </modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.onap.aai.schema-service</groupId>
+                <artifactId>aai-schema</artifactId>
+                <version>${aai.version}</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>com.google.code.javaparser</groupId>
+                        <artifactId>javaparser</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>com.googlecode.json-simple</groupId>
+                        <artifactId>json-simple</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-core</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-stub</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-api</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-netty</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-testing</artifactId>
+                <version>${grpc.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>com.google.protobuf</groupId>
+                <artifactId>protobuf-java</artifactId>
+                <version>${protobuf-java.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.google.protobuf</groupId>
+                <artifactId>protobuf-java-util</artifactId>
+                <version>${protobuf-java.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
 </project>
index f77fb34..df7a3be 100644 (file)
@@ -37,7 +37,6 @@
             <groupId>org.onap.policy.models</groupId>
             <artifactId>policy-models-pdp</artifactId>
             <version>${project.version}</version>
-            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.models</groupId>
             <artifactId>policy-models-tosca</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>common-parameters</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
             <artifactId>utils-test</artifactId>
             <version>${policy.common.version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.persistence</groupId>
+            <artifactId>jakarta.persistence-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.validation</groupId>
+            <artifactId>jakarta.validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>
index e2ccbbd..e2e1667 100644 (file)
             <artifactId>policy-models-base</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.models</groupId>
+            <artifactId>policy-models-dao</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.models</groupId>
             <artifactId>policy-models-tosca</artifactId>
             <artifactId>common-parameters</artifactId>
             <version>${policy.common.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>gson</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
             <artifactId>utils-test</artifactId>
             <version>${policy.common.version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>jakarta.persistence</groupId>
+            <artifactId>jakarta.persistence-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.orm</groupId>
+            <artifactId>hibernate-core</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>
index 35e2014..6cba368 100644 (file)
@@ -69,6 +69,7 @@
             <groupId>org.onap.policy.common</groupId>
             <artifactId>utils</artifactId>
             <version>${policy.common.version}</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.models</groupId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>jakarta.persistence</groupId>
+            <artifactId>jakarta.persistence-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.orm</groupId>
+            <artifactId>hibernate-core</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>
index ce4fd92..c77a41f 100644 (file)
             <artifactId>policy-endpoints</artifactId>
             <version>${policy.common.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>message-bus</artifactId>
+            <version>${policy.common.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
             <artifactId>utils-test</artifactId>
index 31d5b41..c00b229 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2024 Nordix Foundation.
  *  Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,10 +25,10 @@ import java.util.List;
 import java.util.Random;
 import lombok.Getter;
 import lombok.Setter;
-import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.TopicSource;
 import org.onap.policy.common.endpoints.listeners.MessageTypeDispatcher;
+import org.onap.policy.common.message.bus.event.TopicEndpointManager;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSource;
 import org.onap.policy.common.utils.services.Registry;
 import org.onap.policy.common.utils.services.ServiceManager;
 import org.onap.policy.common.utils.services.ServiceManagerException;
index ebe493a..cb94f4e 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,8 +20,8 @@
 
 package org.onap.policy.models.sim.pdp.comm;
 
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
 import org.onap.policy.common.endpoints.listeners.ScoListener;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
 import org.onap.policy.common.utils.coder.StandardCoderObject;
 import org.onap.policy.models.pdp.concepts.PdpStateChange;
 import org.onap.policy.models.sim.pdp.handler.PdpStateChangeMessageHandler;
index 69b25dd..b69e8a0 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019, 2023 Nordix Foundation.
+ *  Copyright (C) 2019, 2023-2024 Nordix Foundation.
  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,8 +25,8 @@ import java.util.List;
 import java.util.Timer;
 import java.util.TimerTask;
 import lombok.Getter;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
-import org.onap.policy.common.endpoints.event.comm.client.TopicSinkClient;
+import org.onap.policy.common.message.bus.event.TopicSink;
+import org.onap.policy.common.message.bus.event.client.TopicSinkClient;
 import org.onap.policy.models.pdp.concepts.PdpStatus;
 import org.onap.policy.models.sim.pdp.handler.PdpMessageHandler;
 import org.slf4j.Logger;
index 52b1b11..e2bfe0c 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,8 +20,8 @@
 
 package org.onap.policy.models.sim.pdp.comm;
 
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
 import org.onap.policy.common.endpoints.listeners.ScoListener;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
 import org.onap.policy.common.utils.coder.StandardCoderObject;
 import org.onap.policy.models.pdp.concepts.PdpUpdate;
 import org.onap.policy.models.sim.pdp.handler.PdpUpdateMessageHandler;
index 60f7c14..548ac95 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019-2021 Nordix Foundation.
+ *  Copyright (C) 2019-2021, 2024 Nordix Foundation.
  *  Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,7 +24,7 @@ package org.onap.policy.models.sim.pdp.handler;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
-import org.onap.policy.common.endpoints.event.comm.TopicSink;
+import org.onap.policy.common.message.bus.event.TopicSink;
 import org.onap.policy.common.utils.services.Registry;
 import org.onap.policy.models.pdp.concepts.PdpResponseDetails;
 import org.onap.policy.models.pdp.concepts.PdpStatus;
index 677d8a7..93c72a2 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019, 2024 Nordix Foundation.
  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
 package org.onap.policy.models.sim.pdp.parameters;
 
 import lombok.Getter;
-import org.onap.policy.common.endpoints.parameters.TopicParameterGroup;
 import org.onap.policy.common.parameters.ParameterGroupImpl;
 import org.onap.policy.common.parameters.annotations.NotBlank;
 import org.onap.policy.common.parameters.annotations.NotNull;
 import org.onap.policy.common.parameters.annotations.Valid;
+import org.onap.policy.common.parameters.topic.TopicParameterGroup;
 
 /**
  * Class to hold all parameters needed for pdp simulator component.
index c0e933f..3b80a35 100644 (file)
@@ -25,7 +25,6 @@ package org.onap.policy.models.sim.pdp.comm;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.io.IOException;
-import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.util.ArrayList;
@@ -35,7 +34,7 @@ import java.util.Map;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
 import org.onap.policy.common.utils.services.Registry;
 import org.onap.policy.models.pdp.concepts.PdpStateChange;
 import org.onap.policy.models.pdp.concepts.PdpStatus;
@@ -125,8 +124,7 @@ class TestPdpStateChangeListener {
 
         String properties;
         try {
-            properties = new String(Files.readAllBytes(Paths.get("src\\test\\resources\\dummyProperties.json")),
-                    StandardCharsets.UTF_8);
+            properties = Files.readString(Paths.get("src\\test\\resources\\dummyProperties.json"));
             propertiesMap.put("content", properties);
         } catch (final IOException e) {
             propertiesMap.put("content", "");
index b63fd15..fbe9a1b 100644 (file)
@@ -25,7 +25,6 @@ package org.onap.policy.models.sim.pdp.comm;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.io.IOException;
-import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.util.ArrayList;
@@ -35,7 +34,7 @@ import java.util.Map;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
+import org.onap.policy.common.message.bus.event.Topic.CommInfrastructure;
 import org.onap.policy.common.utils.services.Registry;
 import org.onap.policy.models.pdp.concepts.PdpStatus;
 import org.onap.policy.models.pdp.concepts.PdpUpdate;
@@ -109,7 +108,7 @@ class TestPdpUpdateListener {
         pdpUpdateMsg.setPdpGroup("pdpGroup");
         pdpUpdateMsg.setPdpSubgroup("pdpSubgroup");
         pdpUpdateMsg.setName(pdpStatus.getName());
-        pdpUpdateMsg.setPdpHeartbeatIntervalMs(Long.valueOf(3000));
+        pdpUpdateMsg.setPdpHeartbeatIntervalMs(3000L);
         final ToscaPolicy toscaPolicy = new ToscaPolicy();
         toscaPolicy.setType("apexpolicytype");
         toscaPolicy.setVersion("1.0");
@@ -117,8 +116,7 @@ class TestPdpUpdateListener {
         final Map<String, Object> propertiesMap = new LinkedHashMap<>();
         String properties;
         try {
-            properties = new String(Files.readAllBytes(Paths.get("src\\test\\resources\\dummyProperties.json")),
-                    StandardCharsets.UTF_8);
+            properties = Files.readString(Paths.get("src\\test\\resources\\dummyProperties.json"));
             propertiesMap.put("content", properties);
         } catch (final IOException e) {
             propertiesMap.put("content", "");
index a6b136b..c460b3e 100644 (file)
@@ -24,8 +24,8 @@ package org.onap.policy.models.sim.pdp.parameters;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
-import org.onap.policy.common.endpoints.parameters.TopicParameters;
 import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.topic.TopicParameters;
 import org.onap.policy.common.utils.coder.Coder;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.coder.StandardCoder;
index 2b5eed4..9c992e1 100644 (file)
@@ -25,12 +25,13 @@ package org.onap.policy.models.sim.pdp.parameters;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.Map;
 import org.junit.jupiter.api.Test;
-import org.onap.policy.common.endpoints.parameters.TopicParameterGroup;
 import org.onap.policy.common.parameters.ValidationResult;
+import org.onap.policy.common.parameters.topic.TopicParameterGroup;
 
 /**
  * Class to perform unit test of {@link PdpSimulatorParameterGroup}.
@@ -70,7 +71,7 @@ class TestPdpSimulatorParameterGroup {
                 .toObject(commonTestData.getPdpSimulatorParameterGroupMap(null), PdpSimulatorParameterGroup.class);
         final ValidationResult validationResult = pdpSimulatorParameters.validate();
         assertFalse(validationResult.isValid());
-        assertEquals(null, pdpSimulatorParameters.getName());
+        assertNull(pdpSimulatorParameters.getName());
         assertTrue(validationResult.getResult().contains("is null"));
     }
 
index 404c7a7..b9f5150 100644 (file)
@@ -4,6 +4,7 @@
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,9 +23,9 @@
 package org.onap.policy.models.simulators;
 
 import lombok.Getter;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
 import org.onap.policy.common.parameters.annotations.ClassName;
 import org.onap.policy.common.parameters.annotations.NotNull;
+import org.onap.policy.common.parameters.rest.RestServerParameters;
 
 @Getter
 public class ClassRestServerParameters extends RestServerParameters {
index 67cd7d8..ca95fd0 100644 (file)
@@ -25,6 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
@@ -45,12 +46,12 @@ import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
 import org.onap.policy.common.endpoints.http.client.HttpClient;
 import org.onap.policy.common.endpoints.http.client.HttpClientConfigException;
 import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
 import org.onap.policy.common.endpoints.http.server.HttpServletServer;
 import org.onap.policy.common.endpoints.http.server.internal.JettyJerseyServer;
+import org.onap.policy.common.parameters.topic.BusTopicParams;
 import org.onap.policy.common.utils.coder.Coder;
 import org.onap.policy.common.utils.coder.CoderException;
 import org.onap.policy.common.utils.network.NetworkUtil;
@@ -67,7 +68,7 @@ class MainTest {
      * Saves system properties.
      */
     @BeforeAll
-    public static void setUpBeforeClass() throws IOException, InterruptedException {
+    public static void setUpBeforeClass() throws IOException {
         savedValues = new HashMap<>();
 
         for (String prop : List.of(JettyJerseyServer.SYSTEM_KEYSTORE_PASSWORD_PROPERTY_NAME,
@@ -233,9 +234,7 @@ class MainTest {
 
         RuntimeException ex = queue.poll(5, TimeUnit.SECONDS);
         assertNotNull(ex);
-        assertTrue(ex.getCause() instanceof IllegalStateException);
+        assertInstanceOf(IllegalStateException.class, ex.getCause());
         assertThat(ex.getCause()).hasMessageStartingWith("interrupted while building");
     }
-
-
 }
index 3397316..601be7f 100644 (file)
             <artifactId>policy-models-dao</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.models</groupId>
+            <artifactId>policy-models-errors</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.onap.policy.models</groupId>
             <artifactId>policy-models-examples</artifactId>
             <version>${project.version}</version>
-            <scope>provided</scope>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
@@ -56,9 +61,9 @@
             <version>${policy.common.version}</version>
         </dependency>
         <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-            <scope>provided</scope>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils</artifactId>
+            <version>${policy.common.version}</version>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
             <version>${policy.common.version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.persistence</groupId>
+            <artifactId>jakarta.persistence-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jakarta.ws.rs</groupId>
+            <artifactId>jakarta.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-collections4</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.yaml</groupId>
+            <artifactId>snakeyaml</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.orm</groupId>
+            <artifactId>hibernate-core</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>