From 8204d232f8cc37e28561ee18b60806c7b3f5f783 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Thu, 18 Apr 2024 17:05:19 +0200 Subject: Update babel dependency in model-loader Issue-ID: AAI-3832 Change-Id: I1cd1588dac16401c7f5064398ff7b8de71bffe30 Signed-off-by: Fiete Ostkamp --- pom.xml | 2 +- .../modelloader/restclient/BabelServiceClientImpl.java | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index 2efcd39..1a3028c 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,7 @@ 1.22 2.10.1 1.3 - 1.9.5 + 1.13.0 1.2.1 2.1.1 1.2.11 diff --git a/src/main/java/org/onap/aai/modelloader/restclient/BabelServiceClientImpl.java b/src/main/java/org/onap/aai/modelloader/restclient/BabelServiceClientImpl.java index 5400892..53ce917 100644 --- a/src/main/java/org/onap/aai/modelloader/restclient/BabelServiceClientImpl.java +++ b/src/main/java/org/onap/aai/modelloader/restclient/BabelServiceClientImpl.java @@ -69,7 +69,7 @@ public class BabelServiceClientImpl implements BabelServiceClient { headers.set(AaiRestClient.HEADER_FROM_APP_ID, AaiRestClient.ML_APP_NAME); HttpEntity entity = new HttpEntity<>(babelRequest, headers); - ResponseEntity> artifactResponse = restTemplate.exchange(resourceUrl, HttpMethod.POST, entity, new ParameterizedTypeReference>() {}); + ResponseEntity> artifactResponse = restTemplate.exchange(resourceUrl, HttpMethod.POST, entity, new ParameterizedTypeReference>() {}); if (logger.isDebugEnabled()) { logger.debug(ModelLoaderMsgs.DISTRIBUTION_EVENT, @@ -80,20 +80,6 @@ public class BabelServiceClientImpl implements BabelServiceClient { throw new BabelServiceClientException(artifactResponse.getBody().toString()); } - List babelArtifact = artifactResponse.getBody().stream() - .map(this::mapBabelDto) - .collect(Collectors.toList()); - - return babelArtifact; - } - - private BabelArtifact mapBabelDto(org.onap.aai.modelloader.babel.BabelArtifact babelDto) { - ArtifactType artifactType = babelDto.getType() == null - ? null - : ArtifactType.valueOf(babelDto.getType().name()); - return new BabelArtifact( - babelDto.getName(), - artifactType, - babelDto.getPayload()); + return artifactResponse.getBody(); } } -- cgit 1.2.3-korg