diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-04-18 17:05:19 +0200 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-04-18 17:05:52 +0200 |
commit | 8204d232f8cc37e28561ee18b60806c7b3f5f783 (patch) | |
tree | 59c8a23aecad6a5e1fe89a47e2178245e5db1d62 /src/main/java | |
parent | 0e9a90774a86475f40d4e946798cf765910a31f6 (diff) |
Update babel dependency in model-loader
Issue-ID: AAI-3832
Change-Id: I1cd1588dac16401c7f5064398ff7b8de71bffe30
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/onap/aai/modelloader/restclient/BabelServiceClientImpl.java | 18 |
1 files changed, 2 insertions, 16 deletions
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<BabelRequest> entity = new HttpEntity<>(babelRequest, headers); - ResponseEntity<List<org.onap.aai.modelloader.babel.BabelArtifact>> artifactResponse = restTemplate.exchange(resourceUrl, HttpMethod.POST, entity, new ParameterizedTypeReference<List<org.onap.aai.modelloader.babel.BabelArtifact>>() {}); + ResponseEntity<List<BabelArtifact>> artifactResponse = restTemplate.exchange(resourceUrl, HttpMethod.POST, entity, new ParameterizedTypeReference<List<BabelArtifact>>() {}); 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> 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(); } } |