diff options
author | niamhcore <niamh.core@est.tech> | 2021-01-11 17:14:08 +0000 |
---|---|---|
committer | niamhcore <niamh.core@est.tech> | 2021-01-18 09:45:16 +0000 |
commit | 6bd247357a3112be96b94d52532aa09231ed520c (patch) | |
tree | 51f651cd44dc57f52842efa519296225dbb9ff1a /cps-service/src/main/java/org | |
parent | a16c3fb5f7f0bbe7bda9e4f21f71a3e958ed523f (diff) |
Persisting data nodes (fragments tree structure)
Issue-ID: CPS-136
Signed-off-by: niamhcore <niamh.core@est.tech>
Change-Id: I559afad41bf0eab1cc98c777a418b348c9c1b81c
Diffstat (limited to 'cps-service/src/main/java/org')
-rw-r--r-- | cps-service/src/main/java/org/onap/cps/spi/CpsDataPersistenceService.java | 12 | ||||
-rw-r--r-- | cps-service/src/main/java/org/onap/cps/spi/model/DataNode.java | 4 |
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; } |