diff options
author | Ruslan Kashapov <ruslan.kashapov@pantheon.tech> | 2021-05-05 13:11:50 +0300 |
---|---|---|
committer | Ruslan Kashapov <ruslan.kashapov@pantheon.tech> | 2021-05-11 10:20:48 +0300 |
commit | 0905ac124ea1d8ab5067b4b00ece0469961cfa36 (patch) | |
tree | d7167be17e4b59d98cedffce2da756a5e50aff63 /cps-rest/src/main/java/org | |
parent | 25e3306737b7284b051dfeaedb39ef83323504d9 (diff) |
Create list-node elements (part2): CPS REST layer
Issue-ID: CPS-360
Change-Id: Iaca8baff085e1659453c06ce0dee0203aa007b4a
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Diffstat (limited to 'cps-rest/src/main/java/org')
-rwxr-xr-x | cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java b/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java index c8b7412593..3d16539b3e 100755 --- a/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java @@ -52,6 +52,13 @@ public class DataRestController implements CpsDataApi { } @Override + public ResponseEntity<String> addListNodeElements(final String jsonData, final String parentNodeXpath, + final String dataspaceName, final String anchorName) { + cpsDataService.saveListNodeData(dataspaceName, anchorName, parentNodeXpath, jsonData); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Override public ResponseEntity<Object> getNodesByDataspace(final String dataspaceName) { return null; } @@ -62,7 +69,7 @@ public class DataRestController implements CpsDataApi { final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants) ? FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS : FetchDescendantsOption.OMIT_DESCENDANTS; final var dataNode = cpsDataService.getDataNode(dataspaceName, anchorName, xpath, - fetchDescendantsOption); + fetchDescendantsOption); return new ResponseEntity<>(DataMapUtils.toDataMap(dataNode), HttpStatus.OK); } |