From 903a48923a445d60f585c0cab67cbd506304af89 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Fri, 18 Oct 2024 14:51:43 +0200 Subject: [PATCH] updaed dependency at helidon-microprofile-health v2.2.2 --- geoportal-service/pom.xml | 16 +++- .../HealthCheckResponseGeoportalProvider.java | 95 ------------------- 2 files changed, 11 insertions(+), 100 deletions(-) delete mode 100644 geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/check/HealthCheckResponseGeoportalProvider.java diff --git a/geoportal-service/pom.xml b/geoportal-service/pom.xml index fe25a84..915e16b 100644 --- a/geoportal-service/pom.xml +++ b/geoportal-service/pom.xml @@ -161,12 +161,18 @@ - - io.smallrye - smallrye-health - 2.1.0 - + + + + + + + + io.helidon.microprofile.health + helidon-microprofile-health + 2.2.2 + diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/check/HealthCheckResponseGeoportalProvider.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/check/HealthCheckResponseGeoportalProvider.java deleted file mode 100644 index a744dad..0000000 --- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/check/HealthCheckResponseGeoportalProvider.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.gcube.application.geoportal.service.rest.check; - -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; - -import org.eclipse.microprofile.health.HealthCheckResponse; -import org.eclipse.microprofile.health.HealthCheckResponse.State; - -import lombok.extern.slf4j.Slf4j; - -/** - * The Class HealthCheckResponseGeoportalProvider. - * - * @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it - * - * Oct 16, 2024 - */ -@Slf4j -public class HealthCheckResponseGeoportalProvider { - - private String name; - private Optional> data; - private Map myMap; - private State state; - - /** - * Instantiates a new health check response geoportal provider. - */ - public HealthCheckResponseGeoportalProvider() { - - } - - /** - * Instantiates a new health check response geoportal provider. - * - * @param name the name - * @param status the status - * @param data the data - */ - public HealthCheckResponseGeoportalProvider(String name, State state, Optional> data) { - this.name = name; - this.state = state; - this.data = data; - } - - public String getName() { - return name; - } - - public Optional> getData() { - return data; - } - - public State getState() { - return state; - } - - public void setName(String name) { - this.name = name; - } - - public void setState(State state) { - this.state = state; - } - - /** - * With data. - * - * @param key the key - * @param value the value - */ - public void withData(String key, String value) { - if (myMap == null) { - myMap = new HashMap<>(); - } - - myMap.put(key, value); - } - - /** - * Builds the health check response. - * - * @return the health check response - */ - public HealthCheckResponse buildHealthCheckResponse() { - if (myMap != null) - data = Optional.of(myMap); - - log.info("data are: " + data); - - return new HealthCheckResponse(name, state, data); - } - -}