diff options
Diffstat (limited to 'cps-service/src/main/java/org/onap/cps/api/impl/CpsAdminServiceImpl.java')
-rwxr-xr-x | cps-service/src/main/java/org/onap/cps/api/impl/CpsAdminServiceImpl.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/api/impl/CpsAdminServiceImpl.java b/cps-service/src/main/java/org/onap/cps/api/impl/CpsAdminServiceImpl.java index 47da64895..4640a0fb3 100755 --- a/cps-service/src/main/java/org/onap/cps/api/impl/CpsAdminServiceImpl.java +++ b/cps-service/src/main/java/org/onap/cps/api/impl/CpsAdminServiceImpl.java @@ -23,6 +23,7 @@ package org.onap.cps.api.impl; import java.util.Collection; +import java.util.stream.Collectors; import org.onap.cps.api.CpsAdminService; import org.onap.cps.spi.CpsAdminPersistenceService; import org.onap.cps.spi.model.Anchor; @@ -59,4 +60,10 @@ public class CpsAdminServiceImpl implements CpsAdminService { public void deleteAnchor(final String dataspaceName, final String anchorName) { cpsAdminPersistenceService.deleteAnchor(dataspaceName, anchorName); } + + @Override + public Collection<String> queryAnchorNames(final String dataspaceName, final Collection<String> moduleNames) { + final Collection<Anchor> anchors = cpsAdminPersistenceService.queryAnchors(dataspaceName, moduleNames); + return anchors.stream().map(anchor -> anchor.getName()).collect(Collectors.toList()); + } } |