Skip to content
Snippets Groups Projects
Commit 4bfdbc7f authored by cramakri's avatar cramakri
Browse files

LMS-1564 Refactored the way the DSS API is presented.

SVN: 16331
parent 5b5c9a64
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package ch.systemsx.cisd.openbis.generic.server; package ch.systemsx.cisd.openbis.generic.server;
import static ch.systemsx.cisd.openbis.generic.shared.GenericSharedConstants.DATA_STORE_SERVER_WEB_APPLICATION_NAME; import static ch.systemsx.cisd.openbis.generic.shared.GenericSharedConstants.DATA_STORE_SERVER_WEB_APPLICATION_NAME;
import static ch.systemsx.cisd.openbis.generic.shared.GenericSharedConstants.DATA_STORE_SERVER_APPLICATION_PATH;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
...@@ -691,6 +692,7 @@ public class ETLService extends AbstractCommonServer<IETLService> implements IET ...@@ -691,6 +692,7 @@ public class ETLService extends AbstractCommonServer<IETLService> implements IET
public String getDefaultDataStoreBaseURL(String sessionToken) public String getDefaultDataStoreBaseURL(String sessionToken)
{ {
// See DataStoreApiUrlUtilities
String url = getDataStoreBaseURL(); String url = getDataStoreBaseURL();
// Strip the web application name from the URL // Strip the web application name from the URL
if (url.endsWith("/" + DATA_STORE_SERVER_WEB_APPLICATION_NAME)) if (url.endsWith("/" + DATA_STORE_SERVER_WEB_APPLICATION_NAME))
...@@ -699,11 +701,14 @@ public class ETLService extends AbstractCommonServer<IETLService> implements IET ...@@ -699,11 +701,14 @@ public class ETLService extends AbstractCommonServer<IETLService> implements IET
url.substring(0, url.length() url.substring(0, url.length()
- (DATA_STORE_SERVER_WEB_APPLICATION_NAME.length() + 1)); - (DATA_STORE_SERVER_WEB_APPLICATION_NAME.length() + 1));
} }
// Strip "/data_store" from the URL as well if (url.endsWith(DATA_STORE_SERVER_APPLICATION_PATH))
final String dataStoreString = "/data_store";
if (url.endsWith(dataStoreString))
{ {
url = url.substring(0, url.length() - dataStoreString.length()); url = url.substring(0, url.length() - DATA_STORE_SERVER_APPLICATION_PATH.length());
}
if (url.endsWith("/"))
{
url = url.substring(0, url.length() - 1);
} }
return url; return url;
......
...@@ -19,7 +19,7 @@ package ch.systemsx.cisd.openbis.generic.shared; ...@@ -19,7 +19,7 @@ package ch.systemsx.cisd.openbis.generic.shared;
/** /**
* Some public shared constants. * Some public shared constants.
* *
* @author Franz-Josef Elmer * @author Franz-Josef Elmer
*/ */
public final class GenericSharedConstants public final class GenericSharedConstants
{ {
...@@ -32,6 +32,8 @@ public final class GenericSharedConstants ...@@ -32,6 +32,8 @@ public final class GenericSharedConstants
/** Part of the URL of the DSS server. */ /** Part of the URL of the DSS server. */
public static final String DATA_STORE_SERVER_WEB_APPLICATION_NAME = "datastore_server"; public static final String DATA_STORE_SERVER_WEB_APPLICATION_NAME = "datastore_server";
public static final String DATA_STORE_SERVER_APPLICATION_PATH = "data_store";
/** Part of the URL of the DSS service. */ /** Part of the URL of the DSS service. */
public static final String DATA_STORE_SERVER_SERVICE_NAME = public static final String DATA_STORE_SERVER_SERVICE_NAME =
DATA_STORE_SERVER_WEB_APPLICATION_NAME + "/dss"; DATA_STORE_SERVER_WEB_APPLICATION_NAME + "/dss";
......
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