diff --git a/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/property/CreatePropertyTypeExecutor.java b/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/property/CreatePropertyTypeExecutor.java index daca8bfbc873e8a0e6947e797d2e4afb3f0b07b9..0459dd9f85dcc945c4488be4dd9539460ee0b2d3 100644 --- a/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/property/CreatePropertyTypeExecutor.java +++ b/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/property/CreatePropertyTypeExecutor.java @@ -207,7 +207,8 @@ public class CreatePropertyTypeExecutor propertyType.setSchema(creation.getSchema()); propertyType.setTransformation(creation.getTransformation()); propertyType.setMetaData(creation.getMetaData()); - propertyType.setMultiValue(creation.isMultiValue()); + propertyType.setMultiValue( + creation.isMultiValue() != null && creation.isMultiValue()); propertyTypes.add(propertyType); } diff --git a/server-application-server/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/JythonManagedPropertyEvaluatorTest.java b/server-application-server/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/JythonManagedPropertyEvaluatorTest.java index 811eae702c3b229072126c8d20a04619e770443b..6f6605d1bc1a1b0a78570fb4ad258805d06600a9 100644 --- a/server-application-server/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/JythonManagedPropertyEvaluatorTest.java +++ b/server-application-server/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/JythonManagedPropertyEvaluatorTest.java @@ -284,7 +284,7 @@ public class JythonManagedPropertyEvaluatorTest extends AssertJUnit { JythonManagedPropertyEvaluator evaluator = new JythonManagedPropertyEvaluator("def updateFromUI(action):\n" - + " property.setValue(person.getUserId() + ';' + person.getUserName())"); + + " property.setStringValue(person.getUserId() + ';' + person.getUserName())"); ManagedProperty property = new ManagedProperty(); property.setPropertyTypeCode("p"); IPerson person = new PersonAdapter("jbravo", "Johny", "Bravo"); @@ -448,7 +448,7 @@ public class JythonManagedPropertyEvaluatorTest extends AssertJUnit { JythonManagedPropertyEvaluator evaluator = new JythonManagedPropertyEvaluator("def updateFromBatchInput(bindings):\n" - + " property.setValue(bindings.get(''))"); + + " property.setStringValue(bindings.get(''))"); ManagedProperty property = new ManagedProperty(); property.setPropertyTypeCode("p"); IPerson person = new PersonAdapter("test", null, null); @@ -466,7 +466,7 @@ public class JythonManagedPropertyEvaluatorTest extends AssertJUnit JythonManagedPropertyEvaluator evaluator = new JythonManagedPropertyEvaluator("def batchColumnNames():\n return ['A', 'B']\n" + "def updateFromBatchInput(bindings):\n" - + " property.setValue(bindings.get('A') + bindings.get('B'))"); + + " property.setStringValue(bindings.get('A') + bindings.get('B'))"); ManagedProperty property = new ManagedProperty(); property.setPropertyTypeCode("p"); IPerson person = new PersonAdapter("test", null, null); @@ -486,7 +486,7 @@ public class JythonManagedPropertyEvaluatorTest extends AssertJUnit new JythonManagedPropertyEvaluator( "def batchColumnNames():\n return ['BC1', 'BC2']\n" + "def updateFromBatchInput(bindings):\n" - + " property.setValue(bindings.get('BC1') + ' ' + " + + " property.setStringValue(bindings.get('BC1') + ' ' + " + "bindings.get('BC2') + ' ' + " + "bindings.get(originalColumnNameBindingKey('OC')))"); ManagedProperty property = new ManagedProperty(); @@ -507,7 +507,7 @@ public class JythonManagedPropertyEvaluatorTest extends AssertJUnit { JythonManagedPropertyEvaluator evaluator = new JythonManagedPropertyEvaluator("def updateFromBatchInput(bindings):\n" - + " property.setValue(person.getUserId() + ';' + person.getUserName())"); + + " property.setStringValue(person.getUserId() + ';' + person.getUserName())"); ManagedProperty property = new ManagedProperty(); property.setPropertyTypeCode("p"); IPerson person = new PersonAdapter("jbravo", "Johny", "Bravo"); @@ -523,7 +523,7 @@ public class JythonManagedPropertyEvaluatorTest extends AssertJUnit { JythonManagedPropertyEvaluator evaluator = new JythonManagedPropertyEvaluator("def updateFromBatchInput(bindings):\n" - + " property.setValue(person.getUserId() + ';' + person.getUserName())"); + + " property.setStringValue(person.getUserId() + ';' + person.getUserName())"); ManagedProperty property = new ManagedProperty(); property.setPropertyTypeCode("p"); IPerson person = new PersonAdapter("jbravo", null, null); @@ -539,7 +539,7 @@ public class JythonManagedPropertyEvaluatorTest extends AssertJUnit { JythonManagedPropertyEvaluator evaluator = new JythonManagedPropertyEvaluator("def updateFromBatchInput(bindings):\n" - + " property.setValue(person)"); + + " property.setStringValue(person)"); ManagedProperty property = new ManagedProperty(); property.setPropertyTypeCode("p"); Map<String, String> bindings = new HashMap<String, String>(); diff --git a/server-application-server/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/updateFromUI-test.py b/server-application-server/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/updateFromUI-test.py index 0413e96856e601d9ddb8927ad0a93f7e97382810..e330cf13f2c4d38de8d4816d1c954f0bc547fc5f 100644 --- a/server-application-server/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/updateFromUI-test.py +++ b/server-application-server/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/updateFromUI-test.py @@ -6,7 +6,7 @@ def updateFromUI(action): if inputValue is None: inputValue = 'null' value = value + input.getLabel() + '=' + inputValue + '|' - property.setValue(value) + property.setStringValue(value) elif action.getName() == 'a2': value = 'a2!' for input in action.getInputWidgetDescriptions(): @@ -14,6 +14,6 @@ def updateFromUI(action): if inputValue is None: inputValue = 'null' value = value + input.getLabel() + '=' + inputValue + '!' - property.setValue(value) + property.setStringValue(value) else: raise ValidationException('action ' + action.getName() + ' is not supported') \ No newline at end of file