From 8a5cbc8ed332e047ed4c15fba2fca2aca9250d7c Mon Sep 17 00:00:00 2001 From: rcirillo-pc Date: Thu, 25 Feb 2021 15:58:20 +0100 Subject: [PATCH] removed http protocol; deprecated old smp classes update to version 3.0.1-SNAPSHOT --- CHANGELOG.md | 4 ++++ pom.xml | 2 +- .../model/protocol/smp/SMPURLConnectionById.java | 1 + .../model/protocol/smp/SMPURLConnectionFactory.java | 11 ++++++----- .../model/protocol/smp/SMPURLConnectionOld.java | 1 + 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e3030c..97a8f07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog for storage-manager-wrapper +## [v3.0.1-SNAPSHOT] + * removed http protocol; + * deprecated old smp classes + ## [v2.6.0-SNAPSHOT] 2020-11-12 * adding new constructor with the backendType as input parameter diff --git a/pom.xml b/pom.xml index 5fd0586..9c03a3a 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.gcube.contentmanagement storage-manager-wrapper - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git diff --git a/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionById.java b/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionById.java index e87fb4a..d0f9660 100644 --- a/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionById.java +++ b/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionById.java @@ -22,6 +22,7 @@ import org.slf4j.LoggerFactory; * * Example: smp://data.gcube.org?uhdnfounhcfnshfnrhbvyaeegytf6dfawiuawgcyg */ +@Deprecated public class SMPURLConnectionById extends SMPConnection { private Logger logger= LoggerFactory.getLogger(SMPURLConnectionOld.class); diff --git a/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionFactory.java b/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionFactory.java index 9b6a479..5ea3a8e 100644 --- a/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionFactory.java +++ b/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionFactory.java @@ -22,6 +22,7 @@ import org.slf4j.LoggerFactory; * @author Roberto Cirillo (ISTI-CNR) * */ +@Deprecated public class SMPURLConnectionFactory { static Logger logger=LoggerFactory.getLogger(SMPURLConnectionFactory.class); @@ -65,11 +66,11 @@ public class SMPURLConnectionFactory { private static boolean isNewSmpFormat(String urlString) { logger.debug("check format: "+urlString); String httpString=urlString; - httpString=httpString.replace("smp://", "http://"); - logger.debug("httpUrl conversion: "+httpString); - URL httpUrl=null; + httpString=httpString.replace("smp://", "https://"); + logger.debug("httpsUrl conversion: "+httpString); + URL httpsUrl=null; try { - httpUrl=new URL(httpString); + httpsUrl=new URL(httpString); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -80,7 +81,7 @@ public class SMPURLConnectionFactory { host=Utils.getResolverHost(services.get(0)); } logger.debug("uri-resolver host: "+host+" in scope: "+ScopeProvider.instance.get()); - if((host!=null) && (host.equals(httpUrl.getHost()))){ + if((host!=null) && (host.equals(httpsUrl.getHost()))){ return true; }else{ return false; diff --git a/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionOld.java b/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionOld.java index 9f69dbf..3d28785 100644 --- a/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionOld.java +++ b/src/main/java/org/gcube/contentmanager/storageclient/model/protocol/smp/SMPURLConnectionOld.java @@ -19,6 +19,7 @@ import org.slf4j.LoggerFactory; * @author Fabio Simeoni (University of Strathclyde), @author Roberto Cirillo (ISTI-CNR) * */ +@Deprecated public class SMPURLConnectionOld extends SMPConnection{