diff options
Diffstat (limited to 'cps-service/src/main/java/org/onap/cps/spi/CpsDataPersistenceService.java')
-rw-r--r-- | cps-service/src/main/java/org/onap/cps/spi/CpsDataPersistenceService.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/spi/CpsDataPersistenceService.java b/cps-service/src/main/java/org/onap/cps/spi/CpsDataPersistenceService.java index 97aecaafd..9a0c180a8 100644 --- a/cps-service/src/main/java/org/onap/cps/spi/CpsDataPersistenceService.java +++ b/cps-service/src/main/java/org/onap/cps/spi/CpsDataPersistenceService.java @@ -21,6 +21,7 @@ package org.onap.cps.spi; +import java.util.Map; import org.checkerframework.checker.nullness.qual.NonNull; import org.onap.cps.spi.model.DataNode; @@ -64,4 +65,25 @@ public interface CpsDataPersistenceService { */ DataNode getDataNode(@NonNull String dataspaceName, @NonNull String anchorName, @NonNull String xpath, @NonNull FetchDescendantsOption fetchDescendantsOption); + + + /** + * Updates leaves for existing data node. + * + * @param dataspaceName dataspace name + * @param anchorName anchor name + * @param xpath xpath + * @param leaves the leaves as a map where key is a leaf name and a value is a leaf value + */ + void updateDataLeaves(@NonNull String dataspaceName, @NonNull String anchorName, @NonNull String xpath, + @NonNull Map<String, Object> leaves); + + /** + * Replaces existing data node content including descendants. + * + * @param dataspaceName dataspace name + * @param anchorName anchor name + * @param dataNode data node + */ + void replaceDataNodeTree(@NonNull String dataspaceName, @NonNull String anchorName, @NonNull DataNode dataNode); } |