Skip to content
Snippets Groups Projects
Commit 410173e8 authored by cramakri's avatar cramakri
Browse files

MINOR: Don't hide dss client url behind data_store.

SVN: 16532
parent 6e9226a4
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,6 @@
package ch.systemsx.cisd.openbis.dss.generic.shared.api.v1;
import static ch.systemsx.cisd.openbis.generic.shared.GenericSharedConstants.DATA_STORE_SERVER_APPLICATION_PATH;
import static ch.systemsx.cisd.openbis.generic.shared.GenericSharedConstants.DATA_STORE_SERVER_WEB_APPLICATION_NAME;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataStore;
......@@ -47,30 +46,19 @@ public class DataStoreApiUrlUtilities
public static String getDataStoreUrlFromServerUrl(String dataStoreServerUrl)
{
String datastoreUrl = dataStoreServerUrl;
// The url objained form a DataStore object is the *download* url. Convert this to the
// datastore URL
if (datastoreUrl.endsWith(DATA_STORE_SERVER_WEB_APPLICATION_NAME))
{
datastoreUrl =
datastoreUrl.substring(0, datastoreUrl.length()
- DATA_STORE_SERVER_WEB_APPLICATION_NAME.length());
}
if (datastoreUrl.endsWith("/"))
{
datastoreUrl = datastoreUrl.substring(0, datastoreUrl.length() - 1);
}
if (!datastoreUrl.endsWith(DATA_STORE_SERVER_APPLICATION_PATH))
{
datastoreUrl = datastoreUrl + "/" + DATA_STORE_SERVER_APPLICATION_PATH;
}
return datastoreUrl;
}
public static String getUrlForRpcService(String serviceUrlSuffix)
{
return "/" + DATA_STORE_SERVER_APPLICATION_PATH + serviceUrlSuffix;
return "/" + DATA_STORE_SERVER_WEB_APPLICATION_NAME + serviceUrlSuffix;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment