From 73870d5bcab6f596a3daa85caa3c4fe604bbf3c4 Mon Sep 17 00:00:00 2001 From: Jonas Arnhold Date: Sun, 16 Jul 2023 14:22:11 +0200 Subject: [PATCH] #207: Remove orphan method in NamespaceService Signed-off-by: Jonas Arnhold --- .../service/NamespaceService.java | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/backend/src/main/java/de/amos/apachepulsarui/service/NamespaceService.java b/backend/src/main/java/de/amos/apachepulsarui/service/NamespaceService.java index 4039bda..8f2440d 100644 --- a/backend/src/main/java/de/amos/apachepulsarui/service/NamespaceService.java +++ b/backend/src/main/java/de/amos/apachepulsarui/service/NamespaceService.java @@ -18,6 +18,7 @@ import java.util.List; + @Service @RequiredArgsConstructor @Slf4j @@ -76,23 +77,6 @@ public List getAllOfTenant(String tenantName) throws PulsarApiException } } - private NamespaceDetailDto enrichWithNamespaceData(NamespaceDetailDto namespace) throws PulsarApiException { - try { - - Namespaces namespaces = pulsarAdmin.namespaces(); - namespace.setBundlesData(namespaces.getBundles(namespace.getName())); - namespace.setMessagesTTL(namespaces.getNamespaceMessageTTL(namespace.getName())); - namespace.setRetentionPolicies(namespaces.getRetention(namespace.getName())); - namespace.setTopics(topicService.getAllForNamespace(namespace.getName())); - - return namespace; - } catch (PulsarAdminException e) { - throw new PulsarApiException( - "Could not fetch namespace data of namespace '%s'".formatted(namespace.getName()), e - ); - } - } - private NamespaceDto enrichWithCardDetails(NamespaceDto namespace) { namespace.setNumberOfTopics(topicService.getAllForNamespace(namespace.getId()).size()); return namespace;