From 5b20030d3a4e9347125c770791317ea198da1519 Mon Sep 17 00:00:00 2001
From: yvesn <yvesn>
Date: Fri, 24 Nov 2017 17:08:47 +0000
Subject: [PATCH] SSDM-5899: added repository id to data set browser

SVN: 38950
---
 .../server/resultset/AbstractExternalDataProvider.java | 10 +++++++---
 .../systemsx/cisd/openbis/public/common-dictionary.js  |  1 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AbstractExternalDataProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AbstractExternalDataProvider.java
index a959e473678..a2c526f3b58 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AbstractExternalDataProvider.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AbstractExternalDataProvider.java
@@ -132,6 +132,7 @@ public abstract class AbstractExternalDataProvider extends
         builder.addColumn(EXTERNAL_DMS_ADDRESS).withDefaultWidth(150).hideByDefault();
         builder.addColumn(LINK_PATH).withDefaultWidth(150).hideByDefault();
         builder.addColumn(LINK_HASH).withDefaultWidth(150).hideByDefault();
+        builder.addColumn(LINK_REPOSITORY).withDefaultWidth(150).hideByDefault();
 
         builder.addColumn(PERM_ID).hideByDefault();
         builder.addColumn(SHOW_DETAILS_LINK).hideByDefault();
@@ -244,7 +245,10 @@ public abstract class AbstractExternalDataProvider extends
                 CommaSeparatedListBuilder externalCodes = new CommaSeparatedListBuilder();
                 CommaSeparatedListBuilder paths = new CommaSeparatedListBuilder();
                 CommaSeparatedListBuilder hashes = new CommaSeparatedListBuilder();
-                CommaSeparatedListBuilder repos = new CommaSeparatedListBuilder();
+
+                // repository ids of content copies are the same for one data set,
+                // so we have only one string
+                String repositoryId = "";
 
                 for (IContentCopy copy : linkDataSet.getCopies())
                 {
@@ -254,7 +258,7 @@ public abstract class AbstractExternalDataProvider extends
                     externalCodes.append(emptyOnNull(copy.getExternalCode()));
                     paths.append(emptyOnNull(copy.getPath()));
                     hashes.append(emptyOnNull(copy.getCommitHash()));
-                    repos.append(emptyOnNull(copy.getRespitoryId()));
+                    repositoryId = emptyOnNull(copy.getRespitoryId());
                 }
 
                 builder.column(EXTERNAL_DMS_CODE).addString(dmsCodes.toString());
@@ -264,7 +268,7 @@ public abstract class AbstractExternalDataProvider extends
                 builder.column(EXTERNAL_CODE).addString(externalCodes.toString());
                 builder.column(LINK_PATH).addString(paths.toString());
                 builder.column(LINK_HASH).addString(hashes.toString());
-                builder.column(LINK_REPOSITORY).addString(repos.toString());
+                builder.column(LINK_REPOSITORY).addString(repositoryId);
             }
         }
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js
index 7d477a17159..14426b6a7a9 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js
@@ -857,6 +857,7 @@ var common = {
  external_dms_address: "External DMS Address",
  link_path: "Link Path",
  link_hash: "Link Commit Hash",
+ link_repository: "Link Repository Id",
  
  //
  // Data Set Viewer
-- 
GitLab