From 410173e8f486d1cee1ca7dbcae077fa02bcea015 Mon Sep 17 00:00:00 2001
From: cramakri <cramakri>
Date: Tue, 15 Jun 2010 15:08:13 +0000
Subject: [PATCH] MINOR: Don't hide dss client url  behind data_store.

SVN: 16532
---
 .../shared/api/v1/DataStoreApiUrlUtilities.java  | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/DataStoreApiUrlUtilities.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/DataStoreApiUrlUtilities.java
index cd29c5f7290..5c124f79b83 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/DataStoreApiUrlUtilities.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/DataStoreApiUrlUtilities.java
@@ -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;
     }
 }
-- 
GitLab