summaryrefslogtreecommitdiffstats
path: root/prh-commons/src
diff options
context:
space:
mode:
authorMichal Kabaj <michal.kabaj@nokia.com>2019-12-05 08:58:17 +0100
committerMichal Kabaj <michal.kabaj@nokia.com>2019-12-05 08:58:17 +0100
commitfc36a6eeebbc05d640d20bfe761037e23d20f1e0 (patch)
tree91f25f74863347c815cf106eb7e5249ece602cea /prh-commons/src
parent2532f556a8bda4d6eec02d5120553262e65c7329 (diff)
Refactor AaiClient API - package structure
- Removed redundant get/patch packages - Flattened aii api package structure to 'api' and 'main' Issue-ID: DCAEGEN2-1955 Signed-off-by: Michal Kabaj <michal.kabaj@nokia.com> Change-Id: I9025245f70c5dd0bb03e7289f8bc7dbf08853687
Diffstat (limited to 'prh-commons/src')
-rw-r--r--prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClient.java (renamed from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/get/AaiGetServiceInstanceClient.java)6
-rw-r--r--prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClient.java (renamed from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/get/AaiHttpGetClient.java)5
-rw-r--r--prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClient.java (renamed from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/patch/AaiHttpPatchClient.java)5
-rw-r--r--prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiServiceInstanceQueryModel.java (renamed from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/model/AaiServiceInstanceQueryModel.java)2
-rw-r--r--prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/main/AaiClientConfiguration.java (renamed from prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiClientConfiguration.java)2
-rw-r--r--prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/main/AaiHttpClientFactory.java1
-rw-r--r--prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiClientConfigurations.java (renamed from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/AaiClientConfigurations.java)6
-rw-r--r--prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClientTest.java (renamed from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/get/AaiGetServiceInstanceClientTest.java)7
-rw-r--r--prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClientTest.java (renamed from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/get/AaiHttpGetClientTest.java)8
-rw-r--r--prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClientTest.java (renamed from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/patch/AaiHttpPatchClientTest.java)8
-rw-r--r--prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AbstractHttpClientTest.java (renamed from prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/AbstractHttpClientTest.java)4
11 files changed, 21 insertions, 33 deletions
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/get/AaiGetServiceInstanceClient.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClient.java
index 89f35154..c41bb906 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/get/AaiGetServiceInstanceClient.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClient.java
@@ -18,16 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api.get;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import static org.onap.dcaegen2.services.prh.adapter.aai.main.AaiHttpClientFactory.createRequestDiagnosticContext;
import io.vavr.collection.HashMap;
import io.vavr.collection.Map;
import org.apache.commons.text.StringSubstitutor;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfiguration;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient;
-import org.onap.dcaegen2.services.prh.adapter.aai.model.AaiServiceInstanceQueryModel;
+import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpMethod;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.ImmutableHttpRequest;
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/get/AaiHttpGetClient.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClient.java
index 122a6097..d50344ee 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/get/AaiHttpGetClient.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClient.java
@@ -18,13 +18,12 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api.get;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import static org.onap.dcaegen2.services.prh.adapter.aai.main.AaiHttpClientFactory.createRequestDiagnosticContext;
import io.vavr.collection.HashMap;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfiguration;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpMethod;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/patch/AaiHttpPatchClient.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClient.java
index efae2d54..ab1066aa 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/patch/AaiHttpPatchClient.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClient.java
@@ -18,14 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api.patch;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import static org.onap.dcaegen2.services.prh.adapter.aai.main.AaiHttpClientFactory.createRequestDiagnosticContext;
import io.vavr.collection.HashMap;
import io.vavr.collection.Map;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfiguration;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
import org.onap.dcaegen2.services.prh.model.AaiJsonBodyBuilderImpl;
import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpMethod;
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/model/AaiServiceInstanceQueryModel.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiServiceInstanceQueryModel.java
index b2819f23..8a9a396c 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/model/AaiServiceInstanceQueryModel.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiServiceInstanceQueryModel.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.model;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import org.immutables.value.Value;
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiClientConfiguration.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/main/AaiClientConfiguration.java
index 53e76892..9b029cf2 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiClientConfiguration.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/main/AaiClientConfiguration.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.api;
+package org.onap.dcaegen2.services.prh.adapter.aai.main;
import java.io.Serializable;
import java.util.Map;
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/main/AaiHttpClientFactory.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/main/AaiHttpClientFactory.java
index 69b5cf83..7005edba 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/main/AaiHttpClientFactory.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/adapter/aai/main/AaiHttpClientFactory.java
@@ -22,7 +22,6 @@ package org.onap.dcaegen2.services.prh.adapter.aai.main;
import java.nio.file.Paths;
import java.util.UUID;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfiguration;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.RxHttpClient;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.RxHttpClientFactory;
import org.onap.dcaegen2.services.sdk.rest.services.model.logging.ImmutableRequestDiagnosticContext;
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/AaiClientConfigurations.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiClientConfigurations.java
index 072fa2d4..ab29e02a 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/AaiClientConfigurations.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiClientConfigurations.java
@@ -17,12 +17,12 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import java.util.HashMap;
import java.util.Map;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfiguration;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableAaiClientConfiguration;
+import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
+import org.onap.dcaegen2.services.prh.adapter.aai.main.ImmutableAaiClientConfiguration;
public final class AaiClientConfigurations {
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/get/AaiGetServiceInstanceClientTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClientTest.java
index 77317414..551f93fb 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/get/AaiGetServiceInstanceClientTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiGetServiceInstanceClientTest.java
@@ -17,21 +17,18 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.get;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-import static org.onap.dcaegen2.services.prh.adapter.aai.AaiClientConfigurations.secureConfiguration;
+import static org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfigurations.secureConfiguration;
import io.vavr.collection.HashMap;
import io.vavr.collection.Map;
import org.junit.jupiter.api.Test;
-import org.onap.dcaegen2.services.prh.adapter.aai.AbstractHttpClientTest;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.get.AaiGetServiceInstanceClient;
-import org.onap.dcaegen2.services.prh.adapter.aai.model.AaiServiceInstanceQueryModel;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpRequest;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/get/AaiHttpGetClientTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClientTest.java
index 10fc0f49..f69fca54 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/get/AaiHttpGetClientTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpGetClientTest.java
@@ -17,20 +17,18 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.get;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.verify;
-import static org.onap.dcaegen2.services.prh.adapter.aai.AaiClientConfigurations.secureConfiguration;
+import static org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfigurations.secureConfiguration;
import io.vavr.collection.HashMap;
import io.vavr.collection.Map;
import org.junit.jupiter.api.Test;
-import org.onap.dcaegen2.services.prh.adapter.aai.AbstractHttpClientTest;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfiguration;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.get.AaiHttpGetClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpRequest;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/patch/AaiHttpPatchClientTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClientTest.java
index 6493b567..de53d4d4 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/patch/AaiHttpPatchClientTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AaiHttpPatchClientTest.java
@@ -17,21 +17,19 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai.patch;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.verify;
-import static org.onap.dcaegen2.services.prh.adapter.aai.AaiClientConfigurations.secureConfiguration;
+import static org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfigurations.secureConfiguration;
import io.vavr.collection.HashMap;
import io.vavr.collection.Map;
import org.junit.jupiter.api.Test;
-import org.onap.dcaegen2.services.prh.adapter.aai.AbstractHttpClientTest;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfiguration;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.patch.AaiHttpPatchClient;
+import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpRequest;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/AbstractHttpClientTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AbstractHttpClientTest.java
index fd9523a9..1ccb8cbd 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/AbstractHttpClientTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/api/AbstractHttpClientTest.java
@@ -17,11 +17,11 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.dcaegen2.services.prh.adapter.aai;
+package org.onap.dcaegen2.services.prh.adapter.aai.api;
import static org.mockito.Mockito.mock;
-import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfiguration;
+import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration;
import org.onap.dcaegen2.services.prh.model.AaiJsonBodyBuilderImpl;
import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse;