aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();
}
}