From d3667cd4d33ba228923be84988142b6257163684 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 22 Feb 2023 15:13:49 +0100 Subject: [PATCH] Added usage of common-utility --- CHANGELOG.md | 1 + pom.xml | 4 ++++ .../resourceregistry/api/rest/ServiceInstance.java | 9 ++------- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 377f354..3f8caa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [v4.3.0-SNAPSHOT] - Enhanced gcube-bom version +- Added usage of common-utility to overcome issues with different Smartgears version (i.e. 3 and 4) ## [v4.2.0] diff --git a/pom.xml b/pom.xml index 2010bcc..e4f0f5c 100644 --- a/pom.xml +++ b/pom.xml @@ -42,6 +42,10 @@ org.gcube.information-system information-system-model + + org.gcube.common + common-utility + org.slf4j slf4j-api diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/ServiceInstance.java b/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/ServiceInstance.java index 3288d87..d8f98e3 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/ServiceInstance.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/api/rest/ServiceInstance.java @@ -1,6 +1,6 @@ package org.gcube.informationsystem.resourceregistry.api.rest; -import org.gcube.common.scope.api.ScopeProvider; +import org.gcube.common.context.ContextUtility; /** * @author Luca Frosini (ISTI - CNR) @@ -11,13 +11,8 @@ public abstract class ServiceInstance { public static final String BASE_URL = "https://url.d4science.org"; - public static String getCurrentContextFullName() { - String context = ScopeProvider.instance.get(); - return context; - } - public static String getServiceURL() { - String context = getCurrentContextFullName(); + String context = ContextUtility.getCurrentContextFullName(); return getServiceURL(context); }