From ed91d68f702fb3e94a1cc295e7d763ba3ec81561 Mon Sep 17 00:00:00 2001
From: izabel <izabel>
Date: Thu, 2 Apr 2009 14:29:00 +0000
Subject: [PATCH] [LMS-829] show data set type property type assignments

SVN: 10553
---
 .../client/web/client/application/Dict.java       | 15 +++++++++------
 .../columns/specific/PropertyTypeColDefKind.java  |  9 +++++++++
 .../client/web/server/CommonClientService.java    |  5 +++++
 .../cisd/openbis/public/common-dictionary.js      |  1 +
 4 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java
index 6fd7ea13248..fd161d9264f 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java
@@ -222,6 +222,8 @@ public abstract class Dict
 
     public static final String MATERIAL_TYPES = "material_types";
 
+    public static final String DATA_SET_TYPES = "data_set_types";
+
     public static final String EXPERIMENT_TYPES = "experiment_types";
 
     public static final String IS_MANDATORY = "is_mandatory";
@@ -446,13 +448,13 @@ public abstract class Dict
 
     public static final String DELETE_VOCABULARY_TERMS_CONFIRMATION_MESSAGE_NO_REPLACEMENTS_SINGULAR =
             "delete_vocabulary_terms_confirmation_message_no_replacements_singular";
-    
+
     public static final String DELETE_VOCABULARY_TERMS_CONFIRMATION_MESSAGE_NO_REPLACEMENTS =
-        "delete_vocabulary_terms_confirmation_message_no_replacements";
-    
+            "delete_vocabulary_terms_confirmation_message_no_replacements";
+
     public static final String DELETE_VOCABULARY_TERMS_CONFIRMATION_MESSAGE_FOR_REPLACEMENTS =
-        "delete_vocabulary_terms_confirmation_message_for_replacements";
-    
+            "delete_vocabulary_terms_confirmation_message_for_replacements";
+
     //
     // Project Browser
     //
@@ -514,7 +516,8 @@ public abstract class Dict
 
     public static final String ENTITY_TYPE_ASSIGNMENTS = "entity_type_assignments";
 
-    public static final String COMBO_BOX_EXPECTED_VALUE_FROM_THE_LIST = "combo_box_expected_value_from_the_list";
+    public static final String COMBO_BOX_EXPECTED_VALUE_FROM_THE_LIST =
+            "combo_box_expected_value_from_the_list";
 
     public static final String DETAILS_TITLE = "details_title";
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/columns/specific/PropertyTypeColDefKind.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/columns/specific/PropertyTypeColDefKind.java
index 2c255d4090e..1da5bd1db47 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/columns/specific/PropertyTypeColDefKind.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/columns/specific/PropertyTypeColDefKind.java
@@ -122,6 +122,15 @@ public enum PropertyTypeColDefKind implements IColumnDefinitionKind<PropertyType
             {
                 return render(entity.getMaterialTypePropertyTypes());
             }
+        }),
+
+    DATA_SET_TYPES(new AbstractColumnDefinitionKind<PropertyType>(Dict.DATA_SET_TYPES)
+        {
+            @Override
+            public String tryGetValue(PropertyType entity)
+            {
+                return render(entity.getDataSetTypePropertyTypes());
+            }
         });
 
     private final AbstractColumnDefinitionKind<PropertyType> columnDefinitionKind;
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java
index 770ff905892..1126488bed8 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java
@@ -76,6 +76,7 @@ import ch.systemsx.cisd.openbis.generic.shared.ICommonServer;
 import ch.systemsx.cisd.openbis.generic.shared.IServer;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriteria;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetType;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetTypePropertyType;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataType;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityType;
@@ -624,6 +625,10 @@ public final class CommonClientService extends AbstractClientService implements
         {
             result.add(etpt);
         }
+        for (DataSetTypePropertyType etpt : propertyType.getDataSetTypePropertyTypes())
+        {
+            result.add(etpt);
+        }
     }
 
     public ResultSet<Project> listProjects(DefaultResultSetConfig<String, Project> criteria)
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 cbcb13504ff..642eb25afbd 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
@@ -138,6 +138,7 @@ var common = {
   description: "Description",
   sample_types: "Sample Types",
   material_types: "Material Types",
+  data_set_types: "Data Set Types",
   experiment_types: "Experiment Types",
   is_mandatory: "Mandatory?",
   property_type: "Property Type",
-- 
GitLab