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 | 35 |
1 files changed, 19 insertions, 16 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 3e0b4475e..0b2cef9bd 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 @@ -3,7 +3,7 @@ * Copyright (C) 2020-2023 Nordix Foundation. * Modifications Copyright (C) 2021 Pantheon.tech * Modifications Copyright (C) 2022 Bell Canada - * Modifications Copyright (C) 2022 TechMahindra Ltd. + * Modifications Copyright (C) 2022-2023 TechMahindra Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -99,30 +99,33 @@ public interface CpsDataPersistenceService { Collection<Collection<DataNode>> newLists); /** - * Retrieves datanode by XPath for given dataspace and anchor. + * Retrieves multiple datanodes for a single XPath for given dataspace and anchor. + * Multiple data nodes are returned when xPath is set to root '/', otherwise single data node + * is returned when a specific xpath is used (Example: /bookstore). * * @param dataspaceName dataspace name * @param anchorName anchor name - * @param xpath xpath + * @param xpath one xpath * @param fetchDescendantsOption defines the scope of data to fetch: either single node or all the descendant nodes * (recursively) as well - * @return data node object + * @return collection of data node object */ - DataNode getDataNode(String dataspaceName, String anchorName, String xpath, - FetchDescendantsOption fetchDescendantsOption); + Collection<DataNode> getDataNodes(String dataspaceName, String anchorName, String xpath, + FetchDescendantsOption fetchDescendantsOption); /** - * Retrieves datanode by XPath for given dataspace and anchor. + * Retrieves multiple datanodes for multiple XPaths, given a dataspace and anchor. * - * @param dataspaceName dataspace name - * @param anchorName anchor name - * @param xpaths collection of xpaths - * @param fetchDescendantsOption defines the scope of data to fetch: either single node or all the descendant nodes - * (recursively) as well - * @return data node object - */ - Collection<DataNode> getDataNodes(String dataspaceName, String anchorName, Collection<String> xpaths, - FetchDescendantsOption fetchDescendantsOption); + * @param dataspaceName dataspace name + * @param anchorName anchor name + * @param xpaths collection of xpaths + * @param fetchDescendantsOption defines the scope of data to fetch: either single node or all the descendant nodes + * (recursively) as well + * @return collection of data node object + */ + Collection<DataNode> getDataNodesForMultipleXpaths(String dataspaceName, String anchorName, + Collection<String> xpaths, + FetchDescendantsOption fetchDescendantsOption); /** * Updates leaves for existing data node. |