aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-11-04 10:21:21 +0000
committeradheli.tavares <adheli.tavares@est.tech>2024-11-07 11:08:50 +0000
commit0fc9d4058c9e9b580f70d3595c5ea73d3130654a (patch)
tree0a6591f7a2f5576150885847c0f057631a071ff3
parentcb69ae09a1ac85beabd52e125320d8427def09b1 (diff)
Fix references and organize dependencies in policy-api after
splitting policy-endpoints and message-bus from common Issue-ID: POLICY-5131 Change-Id: I3f2662fa86236ea68eb6d2bc1297388e274a018d Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
-rw-r--r--main/pom.xml215
-rw-r--r--[-rwxr-xr-x]main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java8
-rw-r--r--main/src/main/java/org/onap/policy/api/main/rest/NodeTemplateController.java4
-rw-r--r--main/src/main/java/org/onap/policy/api/main/rest/provider/healthcheck/HealthCheckProvider.java4
-rw-r--r--main/src/main/java/org/onap/policy/api/main/rest/stub/ApiRestControllerStub.java2
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/TestApiRestController.java2
6 files changed, 191 insertions, 44 deletions
diff --git a/main/pom.xml b/main/pom.xml
index fbb7ba34..3c9a5a5f 100644
--- a/main/pom.xml
+++ b/main/pom.xml
@@ -38,18 +38,13 @@
<dependencies>
<dependency>
- <groupId>org.onap.policy.models</groupId>
- <artifactId>policy-models-pdp</artifactId>
- <version>${policy.models.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.models</groupId>
- <artifactId>policy-models-examples</artifactId>
- <version>${policy.models.version}</version>
+ <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>message-bus</artifactId>
<version>${policy.common.version}</version>
</dependency>
<dependency>
@@ -59,85 +54,237 @@
</dependency>
<dependency>
<groupId>org.onap.policy.common</groupId>
- <artifactId>utils-test</artifactId>
+ <artifactId>utils</artifactId>
<version>${policy.common.version}</version>
- <scope>test</scope>
</dependency>
-
+ <dependency>
+ <groupId>org.onap.policy.models</groupId>
+ <artifactId>policy-models-base</artifactId>
+ <version>${policy.models.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.models</groupId>
+ <artifactId>policy-models-errors</artifactId>
+ <version>${policy.models.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.models</groupId>
+ <artifactId>policy-models-pdp</artifactId>
+ <version>${policy.models.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.models</groupId>
+ <artifactId>policy-models-tosca</artifactId>
+ <version>${policy.models.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ </dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
- <groupId>org.hibernate.orm</groupId>
- <artifactId>hibernate-core</artifactId>
+ <groupId>io.swagger.core.v3</groupId>
+ <artifactId>swagger-annotations-jakarta</artifactId>
</dependency>
<dependency>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcpkix-fips</artifactId>
+ <groupId>io.swagger.core.v3</groupId>
+ <artifactId>swagger-models-jakarta</artifactId>
</dependency>
<dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
+ <groupId>jakarta.annotation</groupId>
+ <artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
+ <groupId>jakarta.validation</groupId>
+ <artifactId>jakarta.validation-api</artifactId>
</dependency>
<dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-webflux</artifactId>
+ <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.eclipse.jetty.toolchain</groupId>
+ <artifactId>jetty-jakarta-servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webflux</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-tomcat</artifactId>
+ <artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-security</artifactId>
+ <artifactId>spring-boot-autoconfigure</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.data</groupId>
+ <artifactId>spring-data-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-config</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-web</artifactId>
+ </dependency>
+
+ <!-- Runtime -->
+
+ <dependency>
+ <groupId>org.onap.policy.models</groupId>
+ <artifactId>policy-models-examples</artifactId>
+ <version>${policy.models.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.micrometer</groupId>
+ <artifactId>micrometer-registry-prometheus</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-codec</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate.orm</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springdoc</groupId>
+ <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
+ <scope>runtime</scope>
</dependency>
<dependency>
- <groupId>org.springdoc</groupId>
- <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-security</artifactId>
+ <scope>runtime</scope>
</dependency>
<dependency>
- <groupId>io.micrometer</groupId>
- <artifactId>micrometer-registry-prometheus</artifactId>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-tomcat</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-core</artifactId>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-webflux</artifactId>
+ <scope>runtime</scope>
</dependency>
+
+ <!-- Test -->
+
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
+ <artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
- <artifactId>mockito-junit-jupiter</artifactId>
+ <artifactId>mockito-core</artifactId>
+ <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.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-test-autoconfigure</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
+
<build>
<resources>
<!-- Output the version of the api service -->
@@ -177,7 +324,7 @@
<importMappings>
ToscaServiceTemplate=org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate,
ToscaNodeTemplateArray=java.util.List,
- HealthCheckReport=org.onap.policy.common.endpoints.report.HealthCheckReport,
+ HealthCheckReport=org.onap.policy.common.utils.report.HealthCheckReport,
PolicyFetchMode=org.onap.policy.api.main.rest.PolicyFetchMode
</importMappings>
<configOptions>
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java b/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java
index 3574545c..ebaf3424 100755..100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java
@@ -33,10 +33,10 @@ import org.onap.policy.api.main.exception.PolicyApiRuntimeException;
import org.onap.policy.api.main.rest.genapi.PolicyDesignApi;
import org.onap.policy.api.main.rest.provider.healthcheck.HealthCheckProvider;
import org.onap.policy.api.main.service.ToscaServiceTemplateService;
-import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
-import org.onap.policy.common.endpoints.report.HealthCheckReport;
-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.report.HealthCheckReport;
import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.base.PfModelRuntimeException;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/NodeTemplateController.java b/main/src/main/java/org/onap/policy/api/main/rest/NodeTemplateController.java
index e76dba56..13b8d661 100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/NodeTemplateController.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/NodeTemplateController.java
@@ -28,8 +28,8 @@ import lombok.RequiredArgsConstructor;
import org.onap.policy.api.main.exception.PolicyApiRuntimeException;
import org.onap.policy.api.main.rest.genapi.ToscaNodeTemplateDesignApi;
import org.onap.policy.api.main.service.ToscaServiceTemplateService;
-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.models.base.PfModelException;
import org.onap.policy.models.base.PfModelRuntimeException;
import org.onap.policy.models.tosca.authorative.concepts.ToscaNodeTemplate;
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/provider/healthcheck/HealthCheckProvider.java b/main/src/main/java/org/onap/policy/api/main/rest/provider/healthcheck/HealthCheckProvider.java
index bbcfcd54..fe022cff 100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/provider/healthcheck/HealthCheckProvider.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/provider/healthcheck/HealthCheckProvider.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved.
* Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2024 Nordix Foundation.
* Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,8 +27,8 @@ package org.onap.policy.api.main.rest.provider.healthcheck;
import lombok.RequiredArgsConstructor;
import org.onap.policy.api.main.service.ToscaServiceTemplateService;
-import org.onap.policy.common.endpoints.report.HealthCheckReport;
import org.onap.policy.common.utils.network.NetworkUtil;
+import org.onap.policy.common.utils.report.HealthCheckReport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/stub/ApiRestControllerStub.java b/main/src/main/java/org/onap/policy/api/main/rest/stub/ApiRestControllerStub.java
index 4d75b00d..0644d839 100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/stub/ApiRestControllerStub.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/stub/ApiRestControllerStub.java
@@ -27,7 +27,7 @@ import lombok.RequiredArgsConstructor;
import org.onap.policy.api.main.rest.CommonRestController;
import org.onap.policy.api.main.rest.PolicyFetchMode;
import org.onap.policy.api.main.rest.genapi.PolicyDesignApi;
-import org.onap.policy.common.endpoints.report.HealthCheckReport;
+import org.onap.policy.common.utils.report.HealthCheckReport;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
import org.springframework.context.annotation.Profile;
import org.springframework.http.ResponseEntity;
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestController.java b/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestController.java
index 47e3f20a..a9a7cb8a 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestController.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestController.java
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
import org.mockito.MockitoAnnotations;
import org.onap.policy.api.main.rest.provider.healthcheck.HealthCheckProvider;
import org.onap.policy.api.main.service.ToscaServiceTemplateService;
-import org.onap.policy.common.endpoints.report.HealthCheckReport;
+import org.onap.policy.common.utils.report.HealthCheckReport;
import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.base.PfModelRuntimeException;