From a991c1a124824e9976aecfc52c34148bf1cd9e11 Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Tue, 17 Jan 2023 10:54:33 +0000 Subject: Remove FilterRepository in ACM As part of participantId refactoring, FilterRepository and related implementation could be removed. Issue-ID: POLICY-4522 Change-Id: Idb078989871f1f65615a7df90aea69f7cd822dae Signed-off-by: FrancescoFioraEst --- .../policy/clamp/acm/runtime/main/rest/ParticipantController.java | 4 ++-- .../clamp/acm/runtime/participants/AcmParticipantProvider.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime-acm/src/main/java/org') diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/ParticipantController.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/ParticipantController.java index abcef7a94..855681e69 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/ParticipantController.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/main/rest/ParticipantController.java @@ -42,7 +42,7 @@ public class ParticipantController extends AbstractRestController implements Par @Override public ResponseEntity getParticipant(UUID participantId, UUID requestId) { ParticipantInformation participantInformation = acmParticipantProvider - .getParticipantById(participantId.toString()); + .getParticipantById(participantId); return ResponseEntity.ok().body(participantInformation); } @@ -54,7 +54,7 @@ public class ParticipantController extends AbstractRestController implements Par @Override public ResponseEntity orderParticipantReport(UUID participantId, UUID requestId) { - acmParticipantProvider.sendParticipantStatusRequest(participantId.toString()); + acmParticipantProvider.sendParticipantStatusRequest(participantId); return new ResponseEntity<>(HttpStatus.ACCEPTED); } diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/participants/AcmParticipantProvider.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/participants/AcmParticipantProvider.java index e1d0423d1..617f75668 100644 --- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/participants/AcmParticipantProvider.java +++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/participants/AcmParticipantProvider.java @@ -22,6 +22,7 @@ package org.onap.policy.clamp.acm.runtime.participants; import java.util.ArrayList; import java.util.List; +import java.util.UUID; import org.onap.policy.clamp.acm.runtime.supervision.comm.ParticipantStatusReqPublisher; import org.onap.policy.clamp.models.acm.concepts.Participant; import org.onap.policy.clamp.models.acm.concepts.ParticipantInformation; @@ -70,7 +71,7 @@ public class AcmParticipantProvider { * @param participantId The UUID of the participant to get * @return The participant */ - public ParticipantInformation getParticipantById(String participantId) { + public ParticipantInformation getParticipantById(UUID participantId) { Participant participant = this.participantProvider.getParticipantById(participantId); ParticipantInformation participantInformation = new ParticipantInformation(); participantInformation.setParticipant(participant); @@ -82,7 +83,7 @@ public class AcmParticipantProvider { * * @param participantId The UUID of the participant to send request to */ - public void sendParticipantStatusRequest(String participantId) { + public void sendParticipantStatusRequest(UUID participantId) { Participant participant = this.participantProvider.getParticipantById(participantId); ToscaConceptIdentifier id = participant.getKey().asIdentifier(); -- cgit 1.2.3-korg