diff options
author | DylanB95EST <dylan.byrne@est.tech> | 2021-11-02 17:25:18 +0000 |
---|---|---|
committer | DylanB95EST <dylan.byrne@est.tech> | 2021-11-02 17:25:23 +0000 |
commit | 30a59dda3869603b9f628c45364e63a3763d3925 (patch) | |
tree | 43943286fd3a32b2bd7ad32280bf3a61cbd5f24d /cps-rest/src/main/java/org/onap | |
parent | 6fda688fa63ea7ccd450002fb94a18b07095bea9 (diff) |
Delete DataNode (xpath) for a given Anchor
Delete Datanode within CPS. Deprecates delete functionality of
/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes.
New api is backwards compatible with this API
Issue-ID: CPS-313
Change-Id: I110c4ab1446e8a1399a0d9bf89c0be614a9104df
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
Diffstat (limited to 'cps-rest/src/main/java/org/onap')
-rwxr-xr-x | cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java | 8 |
1 files changed, 8 insertions, 0 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 f29ead9e9f..e57fb3c8c6 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 @@ -60,6 +60,14 @@ public class DataRestController implements CpsDataApi { } @Override + public ResponseEntity<Void> deleteDataNode(final String dataspaceName, final String anchorName, + final String xpath, final String observedTimestamp) { + cpsDataService.deleteDataNode(dataspaceName, anchorName, xpath, + toOffsetDateTime(observedTimestamp)); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Override public ResponseEntity<String> addListElements(final String parentNodeXpath, final String dataspaceName, final String anchorName, final String jsonData, final String observedTimestamp) { cpsDataService.saveListElements(dataspaceName, anchorName, parentNodeXpath, jsonData, |