Merge "Add get cm handles by modules names - persistence layer"
[cps.git] / cps-service / src / main / java / org / onap / cps / spi / CpsAdminPersistenceService.java
index 35e07f8..f29735f 100755 (executable)
@@ -1,7 +1,7 @@
-/*-
+/*
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2020 Nordix Foundation. All rights reserved.
- *  Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
+ *  Copyright (C) 2020 Nordix Foundation.
+ *  Modifications Copyright (C) 2020 Bell Canada.
  *  Modifications Copyright (C) 2021 Pantheon.tech
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -49,7 +49,6 @@ public interface CpsAdminPersistenceService {
      */
     void createAnchor(@NonNull String dataspaceName, @NonNull String schemaSetName, @NonNull String anchorName);
 
-
     /**
      * Read all anchors in the given a dataspace.
      *
@@ -59,6 +58,15 @@ public interface CpsAdminPersistenceService {
     @NonNull
     Collection<Anchor> getAnchors(@NonNull String dataspaceName);
 
+    /**
+     * Get anchors for the given dataspace name and collection of module names.
+     *
+     * @param dataspaceName dataspace name
+     * @param moduleNames a collection of module names
+     * @return a collection of anchors
+     */
+    Collection<Anchor> getAnchors(String dataspaceName, Collection<String> moduleNames);
+
     /**
      * Get an anchor in the given dataspace using the anchor name.
      *
@@ -76,4 +84,4 @@ public interface CpsAdminPersistenceService {
      * @param anchorName anchor name
      */
     void deleteAnchor(@NonNull String dataspaceName, @NonNull String anchorName);
-}
\ No newline at end of file
+}