summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-04-18 17:05:19 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-04-18 17:05:52 +0200
commit8204d232f8cc37e28561ee18b60806c7b3f5f783 (patch)
tree59c8a23aecad6a5e1fe89a47e2178245e5db1d62
parent0e9a90774a86475f40d4e946798cf765910a31f6 (diff)
Update babel dependency in model-loader
Issue-ID: AAI-3832 Change-Id: I1cd1588dac16401c7f5064398ff7b8de71bffe30 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
-rw-r--r--pom.xml2
-rw-r--r--src/main/java/org/onap/aai/modelloader/restclient/BabelServiceClientImpl.java18
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 @@
<commons-compress.version>1.22</commons-compress.version>
<gson.version>2.10.1</gson.version>
<hamcrest-all.version>1.3</hamcrest-all.version>
- <babel.version>1.9.5</babel.version>
+ <babel.version>1.13.0</babel.version>
<aai.rest.client.version>1.2.1</aai.rest.client.version>
<sdc-distribution-client.version>2.1.1</sdc-distribution-client.version>
<logback.version>1.2.11</logback.version>
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();
}
}