summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-rest/src/main')
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java9
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java6
2 files changed, 8 insertions, 7 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
index 9f171f6094..4da251f3cc 100755
--- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
@@ -1,7 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2021 Pantheon.tech
- * Modifications Copyright (C) 2021-2022 Nordix Foundation
+ * Modifications Copyright (C) 2021-2023 Nordix Foundation
* Modifications Copyright (C) 2021 highstreet technologies GmbH
* Modifications Copyright (C) 2021-2022 Bell Canada
* ================================================================================
@@ -28,8 +28,8 @@ import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum
import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum.PATCH;
import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum.UPDATE;
+import java.util.Collection;
import java.util.List;
-import java.util.Set;
import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -235,7 +235,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
final CmHandleQueryParameters cmHandleQueryParameters) {
final CmHandleQueryApiParameters cmHandleQueryApiParameters =
deprecationHelper.mapOldConditionProperties(cmHandleQueryParameters);
- final Set<NcmpServiceCmHandle> cmHandles = networkCmProxyDataService
+ final Collection<NcmpServiceCmHandle> cmHandles = networkCmProxyDataService
.executeCmHandleSearch(cmHandleQueryApiParameters);
final List<RestOutputCmHandle> outputCmHandles =
cmHandles.stream().map(this::toRestOutputCmHandle).collect(Collectors.toList());
@@ -253,7 +253,8 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
final CmHandleQueryParameters cmHandleQueryParameters) {
final CmHandleQueryApiParameters cmHandleQueryApiParameters =
jsonObjectMapper.convertToValueType(cmHandleQueryParameters, CmHandleQueryApiParameters.class);
- final Set<String> cmHandleIds = networkCmProxyDataService.executeCmHandleIdSearch(cmHandleQueryApiParameters);
+ final Collection<String> cmHandleIds
+ = networkCmProxyDataService.executeCmHandleIdSearch(cmHandleQueryApiParameters);
return ResponseEntity.ok(List.copyOf(cmHandleIds));
}
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java
index 0c27d3efb0..5d8599a1a2 100755
--- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java
@@ -22,8 +22,8 @@
package org.onap.cps.ncmp.rest.controller;
import io.micrometer.core.annotation.Timed;
+import java.util.Collection;
import java.util.List;
-import java.util.Set;
import java.util.stream.Collectors;
import javax.validation.Valid;
import lombok.RequiredArgsConstructor;
@@ -55,7 +55,7 @@ public class NetworkCmProxyInventoryController implements NetworkCmProxyInventor
final CmHandleQueryServiceParameters cmHandleQueryServiceParameters = ncmpRestInputMapper
.toCmHandleQueryServiceParameters(cmHandleQueryParameters);
- final Set<String> cmHandleIds = networkCmProxyDataService
+ final Collection<String> cmHandleIds = networkCmProxyDataService
.executeCmHandleIdSearchForInventory(cmHandleQueryServiceParameters);
return ResponseEntity.ok(List.copyOf(cmHandleIds));
}
@@ -68,7 +68,7 @@ public class NetworkCmProxyInventoryController implements NetworkCmProxyInventor
*/
@Override
public ResponseEntity<List<String>> getAllCmHandleIdsForRegisteredDmi(final String dmiPluginIdentifier) {
- final Set<String> cmHandleIds =
+ final Collection<String> cmHandleIds =
networkCmProxyDataService.getAllCmHandleIdsByDmiPluginIdentifier(dmiPluginIdentifier);
return ResponseEntity.ok(List.copyOf(cmHandleIds));
}