Merge "Add withTrustLevel condition to CmHandle Query API"
[cps.git] / cps-ncmp-service / src / main / java / org / onap / cps / ncmp / api / impl / inventory / CmHandleQueries.java
index 4776788..81467db 100644 (file)
@@ -44,6 +44,14 @@ public interface CmHandleQueries {
      */
     Collection<String> queryCmHandlePublicProperties(Map<String, String> publicPropertyQueryPairs);
 
+    /**
+     * Query CmHandles based on Trust Level.
+     *
+     * @param trustLevelPropertyQueryPairs trust level properties for query
+     * @return CmHandles which have desired trust level
+     */
+    Collection<String> queryCmHandlesByTrustLevel(Map<String, String> trustLevelPropertyQueryPairs);
+
     /**
      * Method which returns cm handles by the cm handles state.
      *
@@ -52,13 +60,22 @@ public interface CmHandleQueries {
      */
     List<DataNode> queryCmHandlesByState(CmHandleState cmHandleState);
 
+    /**
+     * Method to return data nodes with ancestor representing the cm handles.
+     *
+     * @param cpsPath cps path for which the cmHandle is requested
+     * @return a list of data nodes representing the cm handles.
+     */
+    List<DataNode> queryCmHandleAncestorsByCpsPath(String cpsPath,
+                                                   FetchDescendantsOption fetchDescendantsOption);
+
     /**
      * Method to return data nodes representing the cm handles.
      *
      * @param cpsPath cps path for which the cmHandle is requested
      * @return a list of data nodes representing the cm handles.
      */
-    List<DataNode> queryCmHandleDataNodesByCpsPath(String cpsPath, FetchDescendantsOption fetchDescendantsOption);
+    List<DataNode> queryNcmpRegistryByCpsPath(String cpsPath, FetchDescendantsOption fetchDescendantsOption);
 
     /**
      * Method to check the state of a cm handle with given id.