summaryrefslogtreecommitdiffstats
path: root/cps-service/src/main/java/org/onap
diff options
context:
space:
mode:
authorToine Siebelink <toine.siebelink@est.tech>2021-01-18 12:38:57 +0000
committerGerrit Code Review <gerrit@onap.org>2021-01-18 12:38:57 +0000
commitaee547cfbeb8780ed21d2ee902110a888aee3b56 (patch)
tree46b426eb4f467ba8782b52862c95ab276ded24f7 /cps-service/src/main/java/org/onap
parentb5887363577700a417cdcd7fd56cde37383fca40 (diff)
parent6bd247357a3112be96b94d52532aa09231ed520c (diff)
Merge "Persisting data nodes (fragments tree structure)"
Diffstat (limited to 'cps-service/src/main/java/org/onap')
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/CpsDataPersistenceService.java12
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/model/DataNode.java4
2 files changed, 15 insertions, 1 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 12037066de..50ece0e27b 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
@@ -20,6 +20,9 @@
package org.onap.cps.spi;
+import org.checkerframework.checker.nullness.qual.NonNull;
+import org.onap.cps.spi.model.DataNode;
+
/*
Data Store interface that is responsible for handling yang data.
Please follow guidelines in https://gerrit.nordix.org/#/c/onap/ccsdk/features/+/6698/19/cps/interface-proposal/src/main/java/cps/javadoc/spi/DataStoreService.java
@@ -27,4 +30,13 @@ package org.onap.cps.spi;
*/
public interface CpsDataPersistenceService {
+ /**
+ * Store a datanode.
+ *
+ * @param dataspaceName dataspace name
+ * @param anchorName anchor name
+ * @param dataNode data node
+ */
+ void storeDataNode(@NonNull String dataspaceName, @NonNull String anchorName,
+ @NonNull DataNode dataNode);
}
diff --git a/cps-service/src/main/java/org/onap/cps/spi/model/DataNode.java b/cps-service/src/main/java/org/onap/cps/spi/model/DataNode.java
index f9eb22493c..e9c6b56ea5 100644
--- a/cps-service/src/main/java/org/onap/cps/spi/model/DataNode.java
+++ b/cps-service/src/main/java/org/onap/cps/spi/model/DataNode.java
@@ -34,9 +34,11 @@ import lombok.NoArgsConstructor;
public class DataNode {
private String dataspace;
- private String moduleSetName;
+ private String schemaSetName;
+ private String anchorName;
private ModuleReference moduleReference;
private String xpath;
private Map<String, Object> leaves;
private Collection<String> xpathsChildren;
+ private Collection<DataNode> childDataNodes;
}