|
|
|
@ -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;
|
|
|
|
|