X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fcps%2Fapi%2Fimpl%2FCpsAdminServiceImpl.java;h=faff7b611b332ff21a487529987eef6794431206;hb=3d8ee6a5e81faa53b438c8cf78d3403b6df678e1;hp=25185731b389e9da6f2a620512963b4fa87da93d;hpb=4b8ae57149d157cfe8619f99dd8fb82e067f26ce;p=cps.git 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 25185731b..faff7b611 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 @@ -1,7 +1,7 @@ /* - * ============LICENSE_START======================================================= + * ============LICENSE_START======================================================= * Copyright (C) 2020 Nordix Foundation - * Modifications Copyright (C) 2020 Bell Canada. All rights reserved. + * Modifications Copyright (C) 2020 Bell Canada. * Modifications Copyright (C) 2021 Pantheon.tech * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -9,6 +9,7 @@ * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,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; @@ -58,4 +60,10 @@ public class CpsAdminServiceImpl implements CpsAdminService { public void deleteAnchor(final String dataspaceName, final String anchorName) { cpsAdminPersistenceService.deleteAnchor(dataspaceName, anchorName); } -} \ No newline at end of file + + @Override + public Collection queryAnchorNames(final String dataspaceName, final Collection moduleNames) { + final Collection anchors = cpsAdminPersistenceService.queryAnchors(dataspaceName, moduleNames); + return anchors.stream().map(Anchor::getName).collect(Collectors.toList()); + } +}