diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTypePropertyType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTypePropertyType.java index 9245476b39f7d2f331aa3d28662a729122605231..ac8164625e2ea0e6bc168e544e2e57ea9f6405af 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTypePropertyType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTypePropertyType.java @@ -48,7 +48,7 @@ public abstract class EntityTypePropertyType<T extends EntityType> implements Se private boolean showInEditView; - private Boolean showRawValue; + private boolean showRawValue; private Script script; @@ -133,12 +133,12 @@ public abstract class EntityTypePropertyType<T extends EntityType> implements Se this.showInEditView = showInEditView; } - public Boolean getShowRawValue() + public boolean getShowRawValue() { return showRawValue; } - public void setShowRawValue(Boolean showRawValue) + public void setShowRawValue(boolean showRawValue) { this.showRawValue = showRawValue; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/ManagedPropertyEvaluator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/ManagedPropertyEvaluator.java index a0d0e90eb28560ace64001aab3ef437c13414ef9..8853ad218b1ef8b54c67d90cbca5279698cd5736 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/ManagedPropertyEvaluator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/ManagedPropertyEvaluator.java @@ -112,7 +112,7 @@ public class ManagedPropertyEvaluator private final boolean updateFromBatchFunctionDefined; - private final Boolean showRawValueInForms; + private final boolean showRawValueInForms; private List<IManagedInputWidgetDescription> inputWidgetDescriptions; @@ -186,7 +186,7 @@ public class ManagedPropertyEvaluator private boolean inputWidgetsAllowed() { - return showRawValueInForms == null || showRawValueInForms == false; + return showRawValueInForms == false; } private void checkCombinationsOfDefinedFunctions(boolean batchColumnNamesFunctionDefined, @@ -208,12 +208,12 @@ public class ManagedPropertyEvaluator } } - private Boolean evalFunctionShowRawValue() + private boolean evalFunctionShowRawValue() { boolean showRawValueFunctionDefined = evaluator.hasFunction(SHOW_RAW_VALUE_FUNCTION); if (showRawValueFunctionDefined == false) { - return null; + return false; } Object result = evaluator.evalFunction(SHOW_RAW_VALUE_FUNCTION); if (result instanceof Boolean == false) @@ -264,7 +264,7 @@ public class ManagedPropertyEvaluator evaluator.evalFunction(UPDATE_FROM_UI_FUNCTION, action); } - public Boolean getShowRawValueInForms() + public boolean getShowRawValueInForms() { return showRawValueInForms; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/PropertiesEditor.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/PropertiesEditor.java index aee95e6fb16ab9f0fa7f3e98054587e0af103085..0f6e4afd89e0d97bd256b2176357fa3100c0493a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/PropertiesEditor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/PropertiesEditor.java @@ -348,12 +348,12 @@ abstract public class PropertiesEditor<T extends EntityType, S extends EntityTyp { return true; } - Boolean showRawValue = etpt.getShowRawValue(); + boolean showRawValue = etpt.getShowRawValue(); if (editForm) { - return showRawValue == null || showRawValue; + return showRawValue; } - return showRawValue == null || showRawValue || hasInputWidgets(etpt); + return showRawValue || hasInputWidgets(etpt); } } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/ManagedPropertyEvaluatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/ManagedPropertyEvaluatorTest.java index 6dda73919e23a8417ae039896190e7041f4c352d..7ebf6f83117a17781dfc682aa187061e4bc9011f 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/ManagedPropertyEvaluatorTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/ManagedPropertyEvaluatorTest.java @@ -428,7 +428,7 @@ public class ManagedPropertyEvaluatorTest extends AssertJUnit { ManagedPropertyEvaluator evaluator = new ManagedPropertyEvaluator(""); - assertEquals(null, evaluator.getShowRawValueInForms()); + assertEquals(false, evaluator.getShowRawValueInForms()); } @Test @@ -437,7 +437,7 @@ public class ManagedPropertyEvaluatorTest extends AssertJUnit ManagedPropertyEvaluator evaluator = new ManagedPropertyEvaluator("def showRawValueInForms():\n return True"); - assertEquals(Boolean.TRUE, evaluator.getShowRawValueInForms()); + assertEquals(true, evaluator.getShowRawValueInForms()); } @Test @@ -446,7 +446,7 @@ public class ManagedPropertyEvaluatorTest extends AssertJUnit ManagedPropertyEvaluator evaluator = new ManagedPropertyEvaluator("def showRawValueInForms():\n return False"); - assertEquals(Boolean.FALSE, evaluator.getShowRawValueInForms()); + assertEquals(false, evaluator.getShowRawValueInForms()); } @Test(expectedExceptionsMessageRegExp = "Function 'showRawValueInForms' doesn't return "