From fc36a6eeebbc05d640d20bfe761037e23d20f1e0 Mon Sep 17 00:00:00 2001 From: Michal Kabaj Date: Thu, 5 Dec 2019 08:58:17 +0100 Subject: 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 Change-Id: I9025245f70c5dd0bb03e7289f8bc7dbf08853687 --- .../services/prh/configuration/AaiHttpClientConfig.java | 10 +++++----- .../dcaegen2/services/prh/configuration/CbsConfiguration.java | 2 +- .../dcaegen2/services/prh/configuration/CbsContentParser.java | 4 ++-- .../org/onap/dcaegen2/services/prh/configuration/Config.java | 2 +- .../org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImpl.java | 4 ++-- .../org/onap/dcaegen2/services/prh/TestAppConfiguration.java | 2 +- .../prh/configuration/ConsulConfigurationParserTest.java | 4 ++-- .../dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java | 4 ++-- .../onap/dcaegen2/services/prh/tasks/AaiQueryTaskImplTest.java | 2 +- .../onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) (limited to 'prh-app-server') diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AaiHttpClientConfig.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AaiHttpClientConfig.java index d8f6d966..d05edf44 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AaiHttpClientConfig.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/AaiHttpClientConfig.java @@ -22,13 +22,13 @@ package org.onap.dcaegen2.services.prh.configuration; import java.nio.charset.StandardCharsets; import java.util.function.BiFunction; -import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiClientConfiguration; +import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiGetServiceInstanceClient; import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient; -import org.onap.dcaegen2.services.prh.adapter.aai.api.get.AaiGetServiceInstanceClient; -import org.onap.dcaegen2.services.prh.adapter.aai.api.get.AaiHttpGetClient; -import org.onap.dcaegen2.services.prh.adapter.aai.api.patch.AaiHttpPatchClient; +import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpGetClient; +import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpPatchClient; +import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiServiceInstanceQueryModel; +import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration; import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiHttpClientFactory; -import org.onap.dcaegen2.services.prh.adapter.aai.model.AaiServiceInstanceQueryModel; import org.onap.dcaegen2.services.prh.model.AaiJsonBodyBuilderImpl; import org.onap.dcaegen2.services.prh.model.AaiPnfResultModel; import org.onap.dcaegen2.services.prh.model.AaiServiceInstanceResultModel; diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsConfiguration.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsConfiguration.java index d594222b..8373018d 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsConfiguration.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsConfiguration.java @@ -22,7 +22,7 @@ package org.onap.dcaegen2.services.prh.configuration; import com.google.gson.JsonObject; import java.util.Optional; -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.sdk.rest.services.dmaap.client.api.DmaapClientFactory; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.api.MessageRouterPublisher; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.api.MessageRouterSubscriber; diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java index 869d537f..ed935501 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/CbsContentParser.java @@ -28,8 +28,8 @@ import com.google.gson.JsonObject; import java.nio.file.Paths; import java.time.Duration; 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; import org.onap.dcaegen2.services.sdk.model.streams.RawDataStream; import org.onap.dcaegen2.services.sdk.model.streams.dmaap.MessageRouterSink; import org.onap.dcaegen2.services.sdk.model.streams.dmaap.MessageRouterSource; diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/Config.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/Config.java index adfc8c16..b1302cbd 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/Config.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/Config.java @@ -20,7 +20,7 @@ package org.onap.dcaegen2.services.prh.configuration; -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.sdk.rest.services.dmaap.client.api.MessageRouterPublisher; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.api.MessageRouterSubscriber; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterPublishRequest; diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImpl.java index 9489a501..23cd2dd6 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImpl.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImpl.java @@ -24,8 +24,8 @@ import java.util.List; import java.util.Optional; import java.util.stream.Stream; 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.model.ImmutableAaiServiceInstanceQueryModel; +import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiServiceInstanceQueryModel; +import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableAaiServiceInstanceQueryModel; import org.onap.dcaegen2.services.prh.model.AaiPnfResultModel; import org.onap.dcaegen2.services.prh.model.AaiServiceInstanceResultModel; import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel; diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java index a3f024f4..bb79516e 100644 --- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java +++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java @@ -21,7 +21,7 @@ package org.onap.dcaegen2.services.prh; import java.time.Duration; -import org.onap.dcaegen2.services.prh.adapter.aai.api.ImmutableAaiClientConfiguration; +import org.onap.dcaegen2.services.prh.adapter.aai.main.ImmutableAaiClientConfiguration; import org.onap.dcaegen2.services.sdk.model.streams.dmaap.ImmutableMessageRouterSink; import org.onap.dcaegen2.services.sdk.model.streams.dmaap.ImmutableMessageRouterSource; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.ContentType; diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/ConsulConfigurationParserTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/ConsulConfigurationParserTest.java index 89717a58..9c65a178 100644 --- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/ConsulConfigurationParserTest.java +++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/ConsulConfigurationParserTest.java @@ -33,8 +33,8 @@ import java.time.Duration; import org.jetbrains.annotations.Nullable; import org.junit.jupiter.api.Test; import org.onap.dcaegen2.services.prh.TestAppConfiguration; -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; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.ContentType; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterPublishRequest; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.model.MessageRouterSubscribeRequest; diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java index f699a9e4..075cdadd 100644 --- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java +++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImplTest.java @@ -37,8 +37,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.function.Executable; import org.onap.dcaegen2.services.prh.TestAppConfiguration; -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.api.AaiHttpPatchClient; +import org.onap.dcaegen2.services.prh.adapter.aai.main.AaiClientConfiguration; import org.onap.dcaegen2.services.prh.configuration.CbsConfiguration; import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException; import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel; diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImplTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImplTest.java index b2702a9d..3eb883f1 100644 --- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImplTest.java +++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTaskImplTest.java @@ -34,7 +34,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; 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.api.AaiServiceInstanceQueryModel; import org.onap.dcaegen2.services.prh.model.AaiPnfResultModel; import org.onap.dcaegen2.services.prh.model.AaiServiceInstanceResultModel; import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel; diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java index 44c4509c..fe45262a 100644 --- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java +++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java @@ -44,7 +44,7 @@ import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import org.mockito.ArgumentMatchers; import org.onap.dcaegen2.services.prh.TestAppConfiguration; -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.configuration.CbsConfiguration; import org.onap.dcaegen2.services.prh.exceptions.AaiFailureException; import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel; -- cgit 1.2.3-korg