removed http protocol; deprecated old smp classes update to version

3.0.1-SNAPSHOT
This commit is contained in:
Roberto Cirillo 2021-02-25 15:58:20 +01:00
parent 83fce2b7e2
commit 8a5cbc8ed3
5 changed files with 13 additions and 6 deletions

View File

@ -1,5 +1,9 @@
# Changelog for storage-manager-wrapper # Changelog for storage-manager-wrapper
## [v3.0.1-SNAPSHOT]
* removed http protocol;
* deprecated old smp classes
## [v2.6.0-SNAPSHOT] 2020-11-12 ## [v2.6.0-SNAPSHOT] 2020-11-12
* adding new constructor with the backendType as input parameter * adding new constructor with the backendType as input parameter

View File

@ -8,7 +8,7 @@
</parent> </parent>
<groupId>org.gcube.contentmanagement</groupId> <groupId>org.gcube.contentmanagement</groupId>
<artifactId>storage-manager-wrapper</artifactId> <artifactId>storage-manager-wrapper</artifactId>
<version>3.0.0-SNAPSHOT</version> <version>3.0.1-SNAPSHOT</version>
<scm> <scm>
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection> <connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection> <developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>

View File

@ -22,6 +22,7 @@ import org.slf4j.LoggerFactory;
* *
* Example: smp://data.gcube.org?uhdnfounhcfnshfnrhbvyaeegytf6dfawiuawgcyg * Example: smp://data.gcube.org?uhdnfounhcfnshfnrhbvyaeegytf6dfawiuawgcyg
*/ */
@Deprecated
public class SMPURLConnectionById extends SMPConnection { public class SMPURLConnectionById extends SMPConnection {
private Logger logger= LoggerFactory.getLogger(SMPURLConnectionOld.class); private Logger logger= LoggerFactory.getLogger(SMPURLConnectionOld.class);

View File

@ -22,6 +22,7 @@ import org.slf4j.LoggerFactory;
* @author Roberto Cirillo (ISTI-CNR) * @author Roberto Cirillo (ISTI-CNR)
* *
*/ */
@Deprecated
public class SMPURLConnectionFactory { public class SMPURLConnectionFactory {
static Logger logger=LoggerFactory.getLogger(SMPURLConnectionFactory.class); static Logger logger=LoggerFactory.getLogger(SMPURLConnectionFactory.class);
@ -65,11 +66,11 @@ public class SMPURLConnectionFactory {
private static boolean isNewSmpFormat(String urlString) { private static boolean isNewSmpFormat(String urlString) {
logger.debug("check format: "+urlString); logger.debug("check format: "+urlString);
String httpString=urlString; String httpString=urlString;
httpString=httpString.replace("smp://", "http://"); httpString=httpString.replace("smp://", "https://");
logger.debug("httpUrl conversion: "+httpString); logger.debug("httpsUrl conversion: "+httpString);
URL httpUrl=null; URL httpsUrl=null;
try { try {
httpUrl=new URL(httpString); httpsUrl=new URL(httpString);
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
@ -80,7 +81,7 @@ public class SMPURLConnectionFactory {
host=Utils.getResolverHost(services.get(0)); host=Utils.getResolverHost(services.get(0));
} }
logger.debug("uri-resolver host: "+host+" in scope: "+ScopeProvider.instance.get()); 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; return true;
}else{ }else{
return false; return false;

View File

@ -19,6 +19,7 @@ import org.slf4j.LoggerFactory;
* @author Fabio Simeoni (University of Strathclyde), @author Roberto Cirillo (ISTI-CNR) * @author Fabio Simeoni (University of Strathclyde), @author Roberto Cirillo (ISTI-CNR)
* *
*/ */
@Deprecated
public class SMPURLConnectionOld extends SMPConnection{ public class SMPURLConnectionOld extends SMPConnection{