diff options
author | JosephKeenan <joseph.keenan@est.tech> | 2021-11-29 14:48:34 +0000 |
---|---|---|
committer | JosephKeenan <joseph.keenan@est.tech> | 2021-12-02 11:52:07 +0000 |
commit | 14ace1a5da8dd770acd098cf2de575c16962ee78 (patch) | |
tree | c958e70019abee39116c424e047ef66ecdec3eb2 /cps-ncmp-service/src/main/java | |
parent | 4314e7b8ffc0641b0907cf18ca57d329c11f87ed (diff) |
Changing putOperationWithJson to postOperationWithJson
Issue-ID: CPS-736
Change-Id: I3fd2e0b6d6c20683b18f79ed78ed5c8990aee6d8
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
Diffstat (limited to 'cps-ncmp-service/src/main/java')
-rw-r--r-- | cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/client/DmiRestClient.java | 15 | ||||
-rw-r--r-- | cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiDataOperations.java | 4 |
2 files changed, 2 insertions, 17 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/client/DmiRestClient.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/client/DmiRestClient.java index 62eca9451a..9f3df6b9a5 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/client/DmiRestClient.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/client/DmiRestClient.java @@ -47,21 +47,6 @@ public class DmiRestClient { } /** - * Sends a PUT operation to DMI with JSON payload. - * - * @param dmiResourceUrl the DMI resource URL - * @param jsonData the JSON payload - * @param headers the HTTP headers - * @return response entity of type Object - */ - public ResponseEntity<Object> putOperationWithJsonData(final String dmiResourceUrl, - final String jsonData, final HttpHeaders headers) { - //TODO Toine Siebelink, should we use POST operation below instead (and return a String-Entity!) - final var httpEntity = new HttpEntity<>(jsonData, configureHttpHeaders(headers)); - return restTemplate.exchange(dmiResourceUrl, HttpMethod.PUT, httpEntity, Object.class); - } - - /** * Sends POST operation to DMI with json body containing module references. * @param dmiResourceUrl dmi resource url * @param jsonData json data body diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiDataOperations.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiDataOperations.java index b8336455c2..eccb9a0987 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiDataOperations.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiDataOperations.java @@ -62,7 +62,7 @@ public class DmiDataOperations extends DmiOperations { * @param dataStore data store enum * @return {@code ResponseEntity} response entity */ - public ResponseEntity<Object> getResourceDataFromDmi(final String cmHandle, + public ResponseEntity<String> getResourceDataFromDmi(final String cmHandle, final String resourceId, final String optionsParamInQuery, final String acceptParamInHeader, @@ -79,7 +79,7 @@ public class DmiDataOperations extends DmiOperations { persistenceCmHandle.resolveDmiServiceName(DATA), cmHandle, resourceId, optionsParamInQuery, dataStore); final var httpHeaders = prepareHeader(acceptParamInHeader); - return dmiRestClient.putOperationWithJsonData(dmiResourceDataUrl, jsonBody, httpHeaders); + return dmiRestClient.postOperationWithJsonData(dmiResourceDataUrl, jsonBody, httpHeaders); } /** |