diff options
author | 2021-11-02 14:15:17 +0000 | |
---|---|---|
committer | 2021-11-02 14:15:17 +0000 | |
commit | 6fda688fa63ea7ccd450002fb94a18b07095bea9 (patch) | |
tree | 10948449183a46e790e06c1973aa7c6d455b8158 /cps-service/src/main/java/org/onap/cps/api/CpsDataService.java | |
parent | 5ae0e346118103b31f409188c4c3010933f6bde2 (diff) | |
parent | a79c9f1bdf335843c29a425da53c15b5e353e5a3 (diff) |
Merge "Clean Up Code around List Nodes"
Diffstat (limited to 'cps-service/src/main/java/org/onap/cps/api/CpsDataService.java')
-rw-r--r-- | cps-service/src/main/java/org/onap/cps/api/CpsDataService.java | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/api/CpsDataService.java b/cps-service/src/main/java/org/onap/cps/api/CpsDataService.java index 31a751734..e6cb65fa7 100644 --- a/cps-service/src/main/java/org/onap/cps/api/CpsDataService.java +++ b/cps-service/src/main/java/org/onap/cps/api/CpsDataService.java @@ -56,17 +56,18 @@ public interface CpsDataService { @NonNull String jsonData, OffsetDateTime observedTimestamp); /** - * Persists child data fragment representing list-node (with one or more elements) under existing data node for the + * Persists child data fragment representing one or more list elements under existing data node for the * given anchor and dataspace. * - * @param dataspaceName dataspace name - * @param anchorName anchor name - * @param parentNodeXpath parent node xpath - * @param jsonData json data representing list element + * @param dataspaceName dataspace name + * @param anchorName anchor name + * @param parentNodeXpath parent node xpath + * @param jsonData json data representing list element(s) * @param observedTimestamp observedTimestamp */ - void saveListNodeData(@NonNull String dataspaceName, @NonNull String anchorName, @NonNull String parentNodeXpath, - @NonNull String jsonData, OffsetDateTime observedTimestamp); + void saveListElements(@NonNull String dataspaceName, @NonNull String anchorName, + @NonNull String parentNodeXpath, + @NonNull String jsonData, OffsetDateTime observedTimestamp); /** * Retrieves datanode by XPath for given dataspace and anchor. @@ -106,29 +107,28 @@ public interface CpsDataService { @NonNull String jsonData, OffsetDateTime observedTimestamp); /** - * Replaces (if exists) child data fragment representing list-node (with one or more elements) under existing data - * node for the given anchor and dataspace. + * Replaces list content by removing all existing elements and inserting the given new elements as json + * under given parent, anchor and dataspace. * * @param dataspaceName dataspace name * @param anchorName anchor name * @param parentNodeXpath parent node xpath - * @param jsonData json data representing list element + * @param jsonData json data representing the new list elements * @param observedTimestamp observedTimestamp */ - void replaceListNodeData(@NonNull String dataspaceName, @NonNull String anchorName, @NonNull String parentNodeXpath, - @NonNull String jsonData, OffsetDateTime observedTimestamp); + void replaceListContent(@NonNull String dataspaceName, @NonNull String anchorName, @NonNull String parentNodeXpath, + @NonNull String jsonData, OffsetDateTime observedTimestamp); /** - * Deletes (if exists) child data fragment representing list-node (with one or more elements) under existing data - * node for the given anchor and dataspace. + * Deletes a list or a list-element under given anchor and dataspace. * * @param dataspaceName dataspace name * @param anchorName anchor name - * @param listNodeXpath list node xpath + * @param listElementXpath list element xpath * @param observedTimestamp observedTimestamp */ - void deleteListNodeData(@NonNull String dataspaceName, @NonNull String anchorName, @NonNull String listNodeXpath, - OffsetDateTime observedTimestamp); + void deleteListOrListElement(@NonNull String dataspaceName, @NonNull String anchorName, + @NonNull String listElementXpath, OffsetDateTime observedTimestamp); /** * Updates leaves of DataNode for given dataspace and anchor using xpath, along with the leaves of each Child Data |