From dbd445b48b328d451fed58fe0b4274cd08c98cf2 Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Mon, 24 Oct 2011 09:54:09 +0000 Subject: [PATCH] LMS-2587 bug fixed SVN: 23394 --- .../query/server/api/v1/QueryApiServer.java | 8 ++++++-- .../plugin/query/server/api/v1/Util.java | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) 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 9834ed6ceaf..8ab078468ac 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 @@ -151,9 +151,13 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I public QueryTableModel createReportFromDataSets(String sessionToken, String dataStoreCode, String serviceKey, List<String> dataSetCodes) { - return translate(commonServer.createReportFromDatasets(sessionToken, + checkSession(sessionToken); + + DatastoreServiceDescription description = DatastoreServiceDescription.reporting(serviceKey, "", new String[0], dataStoreCode, - null), dataSetCodes)); + null); + return translate(commonServer.createReportFromDatasets(sessionToken, description, + dataSetCodes)); } public int getMajorVersion() diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/Util.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/Util.java index 27867f21e64..b6bbc61109c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/Util.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/Util.java @@ -20,19 +20,24 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataTypeCode; import ch.systemsx.cisd.openbis.plugin.query.shared.api.v1.dto.QueryTableColumnDataType; /** - * - * * @author Franz-Josef Elmer */ class Util { - static QueryTableColumnDataType translate(DataTypeCode dataTypeCode) + static QueryTableColumnDataType translate(DataTypeCode dataTypeCodeOrNull) { - switch (dataTypeCode) + if (dataTypeCodeOrNull == null) + { + return QueryTableColumnDataType.STRING; + } + switch (dataTypeCodeOrNull) { - case INTEGER: return QueryTableColumnDataType.LONG; - case REAL: return QueryTableColumnDataType.DOUBLE; - default: return QueryTableColumnDataType.STRING; + case INTEGER: + return QueryTableColumnDataType.LONG; + case REAL: + return QueryTableColumnDataType.DOUBLE; + default: + return QueryTableColumnDataType.STRING; } } } -- GitLab