update to version 2.5.1:

Costants moved on storage-manager-core Costants class
added new Costants class for test package

git-svn-id: https://svn.research-infrastructures.eu/public/d4science/gcube/branches/content-management/storage-manager-wrapper/2.5@173242 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Roberto Cirillo 2018-10-11 10:53:41 +00:00
parent 4d184c64ba
commit f9362747c6
6 changed files with 15 additions and 11 deletions

View File

@ -1,4 +1,8 @@
<ReleaseNotes>
<Changeset component="org.gcube.content-management.storage-manager-wrapper.2-5-1" date="2018-10-11">
<Change>Constants definition moved on storage-manager-core Castants class</Change>
<Change>Added new Costants class for Junit package</Change>
</Changeset>
<Changeset component="org.gcube.content-management.storage-manager-wrapper.2-5-0" date="2017-10-15">
<Change>Added new JUnit Test classes</Change>
<Change>update JUnit Test Classes</Change>

View File

@ -8,7 +8,7 @@
</parent>
<groupId>org.gcube.contentmanagement</groupId>
<artifactId>storage-manager-wrapper</artifactId>
<version>2.5.0-SNAPSHOT</version>
<version>2.5.1-SNAPSHOT</version>
<scm>
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/content-management/${project.artifactId}</connection>
<developerConnection>scm:svn:https://svn.d4science.research-infrastructures.eu/gcube/trunk/content-management/${project.artifactId}</developerConnection>

View File

@ -9,10 +9,9 @@ import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.contentmanagement.blobstorage.service.IClient;
import org.gcube.contentmanagement.blobstorage.service.operation.GetHttpUrl;
import org.gcube.contentmanagement.blobstorage.service.operation.GetUrl;
import org.gcube.contentmanagement.blobstorage.transport.backend.util.Costants;
import org.gcube.contentmanager.storageclient.wrapper.AccessType;
import org.gcube.contentmanager.storageclient.wrapper.Configuration;
import org.gcube.contentmanager.storageclient.wrapper.MemoryType;
import org.gcube.contentmanager.storageclient.wrapper.ISClientConnector;
import org.gcube.contentmanager.storageclient.wrapper.StorageClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -66,7 +65,7 @@ public class SMPURLConnectionById extends SMPConnection {
protected InputStream storageClient(String url) throws Exception {
logger.info("url :" + url);
String [] urlParam=url.split(GetUrl.URL_SEPARATOR);
String [] urlParam=url.split(Costants.URL_SEPARATOR);
String protocol=urlParam[0];
protocol=protocol.substring(0, protocol.length()-1);
logger.debug("protocol is "+protocol);
@ -75,9 +74,9 @@ public class SMPURLConnectionById extends SMPConnection {
}
String encrypted=retrieveStringEncrypted(urlParam);
MemoryType memory=null;
if(encrypted.contains(GetHttpUrl.VOLATILE_URL_IDENTIFICATOR)){
if(encrypted.contains(Costants.VOLATILE_URL_IDENTIFICATOR)){
memory=MemoryType.VOLATILE;
encrypted=encrypted.replace(GetHttpUrl.VOLATILE_URL_IDENTIFICATOR, "");
encrypted=encrypted.replace(Costants.VOLATILE_URL_IDENTIFICATOR, "");
}
logger.debug("String encrypted "+encrypted);
String phrase=retrieveEncryptionPhrase();
@ -103,7 +102,7 @@ public class SMPURLConnectionById extends SMPConnection {
String encrypted=urlParam[3];
int i=4;
while(i < urlParam.length){
encrypted=encrypted+GetUrl.URL_SEPARATOR+urlParam[i];
encrypted=encrypted+Costants.URL_SEPARATOR+urlParam[i];
i++;
}
return encrypted;

View File

@ -12,6 +12,7 @@ import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.common.scope.impl.ScopeBean;
import org.gcube.common.scope.impl.ScopeBean.Type;
import org.gcube.contentmanagement.blobstorage.service.operation.GetUrl;
import org.gcube.contentmanagement.blobstorage.transport.backend.util.Costants;
import org.gcube.contentmanager.storageclient.protocol.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -47,7 +48,7 @@ public class SMPURLConnectionFactory {
* @return
*/
private static boolean isIntermediateType(String urlString) {
String [] urlParam=urlString.split(GetUrl.URL_SEPARATOR);
String [] urlParam=urlString.split(Costants.URL_SEPARATOR);
String infraHost=urlParam[2];
if(Utils.isScopeProviderMatch(infraHost))
return true;

View File

@ -8,7 +8,6 @@ import java.net.URL;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.contentmanagement.blobstorage.service.IClient;
import org.gcube.contentmanager.storageclient.wrapper.AccessType;
import org.gcube.contentmanager.storageclient.wrapper.Configuration;
import org.gcube.contentmanager.storageclient.wrapper.MemoryType;
import org.gcube.contentmanager.storageclient.wrapper.StorageClient;
import org.slf4j.Logger;

View File

@ -7,6 +7,7 @@ import org.gcube.contentmanager.storageclient.wrapper.MemoryType;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.contentmanagement.blobstorage.service.IClient;
import org.gcube.contentmanagement.blobstorage.service.impl.ServiceEngine;
import org.gcube.contentmanagement.blobstorage.transport.backend.util.Costants;
import org.gcube.contentmanager.storageclient.protocol.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -234,9 +235,9 @@ public class StorageClient {
if(typeAccess == AccessType.PUBLIC){
clientID="";
}else if(typeAccess == AccessType.PRIVATE){
clientID=ServiceEngine.FILE_SEPARATOR+"home"+ServiceEngine.FILE_SEPARATOR+serviceClass+ServiceEngine.FILE_SEPARATOR+serviceName+ServiceEngine.FILE_SEPARATOR+id;
clientID=Costants.FILE_SEPARATOR+"home"+Costants.FILE_SEPARATOR+serviceClass+Costants.FILE_SEPARATOR+serviceName+Costants.FILE_SEPARATOR+id;
}else if(typeAccess==AccessType.SHARED){
clientID=ServiceEngine.FILE_SEPARATOR+"home"+ServiceEngine.FILE_SEPARATOR+serviceClass+ServiceEngine.FILE_SEPARATOR+serviceName;
clientID=Costants.FILE_SEPARATOR+"home"+Costants.FILE_SEPARATOR+serviceClass+Costants.FILE_SEPARATOR+serviceName;
}else{
throw new IllegalArgumentException("type is not correctly: public, private or shared");
}