diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiServer.java index 518fedae0f64d62c519484d42f44875b0c90045b..3dd2987ed3ba82a83b2de45cb9d3668528bf6749 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiServer.java @@ -195,7 +195,8 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I { checkSession(sessionToken); - List<AggregationServiceDescription> services = new ArrayList<AggregationServiceDescription>(); + List<AggregationServiceDescription> services = + new ArrayList<AggregationServiceDescription>(); List<DataStorePE> dataStores = getDAOFactory().getDataStoreDAO().listDataStores(); for (DataStorePE dataStore : dataStores) { @@ -211,6 +212,7 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I AggregationServiceDescription info = new AggregationServiceDescription(); info.setServiceKey(service.getKey()); info.setDataStoreCode(dataStore.getCode()); + info.setDataStoreBaseUrl(dataStore.getDownloadUrl()); services.add(info); } } @@ -219,13 +221,16 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I } @Override - public QueryTableModel createReportFromAggregationService(String sessionToken, String dataStoreCode, String serviceKey, Map<String, Object> parameters) + public QueryTableModel createReportFromAggregationService(String sessionToken, + String dataStoreCode, String serviceKey, Map<String, Object> parameters) { checkSession(sessionToken); DatastoreServiceDescription description = - DatastoreServiceDescription.reporting(serviceKey, "", new String[0], dataStoreCode, ReportingPluginType.AGGREGATION_TABLE_MODEL); - return translate(commonServer.createReportFromAggregationService(sessionToken, description, parameters)); + DatastoreServiceDescription.reporting(serviceKey, "", new String[0], dataStoreCode, + ReportingPluginType.AGGREGATION_TABLE_MODEL); + return translate(commonServer.createReportFromAggregationService(sessionToken, description, + parameters)); } @Override @@ -237,7 +242,7 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I @Override public int getMinorVersion() { - return 3; + return 4; } private QueryTableModel translate(TableModel result) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/api/v1/IQueryApiServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/api/v1/IQueryApiServer.java index 643b243ccf9faa93da2cbcb338cf9ac45f5b3da1..397c80850c0b9d4c369bd6349906eb2876b80e90 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/api/v1/IQueryApiServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/api/v1/IQueryApiServer.java @@ -28,7 +28,7 @@ import ch.systemsx.cisd.openbis.plugin.query.shared.api.v1.dto.QueryTableModel; import ch.systemsx.cisd.openbis.plugin.query.shared.api.v1.dto.ReportDescription; /** - * Public API interface to query server (version 1.2). + * Public API interface to query server (version 1.4). * * @author Franz-Josef Elmer */ @@ -114,7 +114,7 @@ public interface IQueryApiServer extends IRpcService * @since 1.3 */ @Transactional(readOnly = true) - public QueryTableModel createReportFromAggregationService(String sessionToken, String dataStoreCode, - String serviceKey, Map<String, Object> parameters); + public QueryTableModel createReportFromAggregationService(String sessionToken, + String dataStoreCode, String serviceKey, Map<String, Object> parameters); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/api/v1/dto/AggregationServiceDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/api/v1/dto/AggregationServiceDescription.java index 0a1589fee6bb9f84ac67f1a3bfb3cae12af920b7..3081ba826032d152536200b19bb1cb91f29a3b44 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/api/v1/dto/AggregationServiceDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/api/v1/dto/AggregationServiceDescription.java @@ -32,18 +32,30 @@ public class AggregationServiceDescription implements Serializable private String dataStoreCode; + private String dataStoreBaseUrl; + private String serviceKey; private AggregationServiceType type; /** - * The code of the data store the provides this service. Non-null. + * The code of the data store that provides this service. Non-null. */ public String getDataStoreCode() { return dataStoreCode; } + /** + * Returns the base URL of the data store that provides this service. Non-null. + * + * @since 1.4 + */ + public String getDataStoreBaseUrl() + { + return dataStoreBaseUrl; + } + /** * The key that identifies this particular service. Non-null. */ @@ -67,6 +79,11 @@ public class AggregationServiceDescription implements Serializable this.dataStoreCode = dataStoreCode; } + public void setDataStoreBaseUrl(String dataStoreBaseUrl) + { + this.dataStoreBaseUrl = dataStoreBaseUrl; + } + public void setServiceKey(String key) { this.serviceKey = key;