diff options
Diffstat (limited to 'prh-app-server/src/main')
4 files changed, 11 insertions, 12 deletions
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 9156732d..d8f6d966 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 @@ -28,11 +28,11 @@ import org.onap.dcaegen2.services.prh.adapter.aai.api.get.AaiGetServiceInstanceC 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.main.AaiHttpClientFactory; -import org.onap.dcaegen2.services.prh.adapter.aai.model.AaiModel; 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; +import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel; import org.onap.dcaegen2.services.prh.model.utils.PrhModelAwareGsonBuilder; import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpResponse; import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.RxHttpClient; @@ -47,7 +47,7 @@ public class AaiHttpClientConfig { private CbsConfiguration cbsConfiguration; @Bean - public AaiHttpClient<AaiModel, HttpResponse> getPatchClientFactory() { + public AaiHttpClient<ConsumerDmaapModel, HttpResponse> getPatchClientFactory() { return createLazyConfigClient( (config, client) -> new AaiHttpPatchClient(config, new AaiJsonBodyBuilderImpl(), client)); } @@ -64,7 +64,7 @@ public class AaiHttpClientConfig { } @Bean - public AaiHttpClient<AaiModel, AaiPnfResultModel> getGetClient() { + public AaiHttpClient<ConsumerDmaapModel, AaiPnfResultModel> getGetClient() { return createLazyConfigClient( (config, client) -> new AaiHttpGetClient(config, client) .map(httpResponse -> { diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImpl.java index e0764fd2..fd7f11c0 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImpl.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiProducerTaskImpl.java @@ -21,7 +21,6 @@ package org.onap.dcaegen2.services.prh.tasks; import org.onap.dcaegen2.services.prh.adapter.aai.api.AaiHttpClient; -import org.onap.dcaegen2.services.prh.adapter.aai.model.AaiModel; import org.onap.dcaegen2.services.prh.exceptions.AaiNotFoundException; import org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException; import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException; @@ -43,10 +42,10 @@ public class AaiProducerTaskImpl implements AaiProducerTask { private static final Logger LOGGER = LoggerFactory.getLogger(AaiProducerTaskImpl.class); - private final AaiHttpClient<AaiModel, HttpResponse> aaiHttpPatchClient; + private final AaiHttpClient<ConsumerDmaapModel, HttpResponse> aaiHttpPatchClient; @Autowired - public AaiProducerTaskImpl(final AaiHttpClient<AaiModel, HttpResponse> aaiHttpPatchClient) { + public AaiProducerTaskImpl(final AaiHttpClient<ConsumerDmaapModel, HttpResponse> aaiHttpPatchClient) { this.aaiHttpPatchClient = aaiHttpPatchClient; } diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTask.java index 0bcb1dea..b4ab10f0 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTask.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AaiQueryTask.java @@ -20,10 +20,10 @@ package org.onap.dcaegen2.services.prh.tasks; -import org.onap.dcaegen2.services.prh.adapter.aai.model.AaiModel; +import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel; import reactor.core.publisher.Mono; @FunctionalInterface public interface AaiQueryTask { - Mono<Boolean> execute(final AaiModel aaiModel); + Mono<Boolean> execute(final ConsumerDmaapModel aaiModel); } 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 46f9d3d9..9489a501 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,11 +24,11 @@ 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.AaiModel; 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.model.AaiPnfResultModel; import org.onap.dcaegen2.services.prh.model.AaiServiceInstanceResultModel; +import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel; import org.onap.dcaegen2.services.prh.model.Relationship; import org.onap.dcaegen2.services.prh.model.RelationshipData; import org.onap.dcaegen2.services.prh.model.RelationshipDict; @@ -44,19 +44,19 @@ public class AaiQueryTaskImpl implements AaiQueryTask { static final String SERVICE_TYPE = "service-subscription.service-type"; static final String SERVICE_INSTANCE_ID = "service-instance.service-instance-id"; - private final AaiHttpClient<AaiModel, AaiPnfResultModel> getPnfModelClient; + private final AaiHttpClient<ConsumerDmaapModel, AaiPnfResultModel> getPnfModelClient; private final AaiHttpClient<AaiServiceInstanceQueryModel, AaiServiceInstanceResultModel> getServiceClient; @Autowired public AaiQueryTaskImpl( - final AaiHttpClient<AaiModel, AaiPnfResultModel> getPnfModelClient, + final AaiHttpClient<ConsumerDmaapModel, AaiPnfResultModel> getPnfModelClient, final AaiHttpClient<AaiServiceInstanceQueryModel, AaiServiceInstanceResultModel> getServiceClient) { this.getPnfModelClient = getPnfModelClient; this.getServiceClient = getServiceClient; } @Override - public Mono<Boolean> execute(AaiModel aaiModel) { + public Mono<Boolean> execute(ConsumerDmaapModel aaiModel) { return getPnfModelClient .getAaiResponse(aaiModel) .flatMap(this::checkIfPnfHasRelationToService) |