diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterPropertyType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterPropertyType.java index 51cf37cc2496f931a6463d59cfa69e326357637a..ef1fac7d4265381fbea340f126a1dd4f7281e977 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterPropertyType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterPropertyType.java @@ -35,8 +35,7 @@ public class RegisterPropertyType implements ICommand private final static String TYPE = "type"; - @SuppressWarnings("unused") - private static final String LABEL = ", label = "; + private static final String LABEL = "label"; private static boolean validated(List<String> tokens) { @@ -77,6 +76,23 @@ public class RegisterPropertyType implements ICommand propertyType.setDataType(new DataType(dataTypeCode)); } + if (tokens.size() > 5) + { + String token = tokens.get(5); + int indexOfEqualSign = token.indexOf('='); + if (indexOfEqualSign < 0) + { + throw new IllegalArgumentException("Missing '=': " + token); + } + String key = token.substring(0, indexOfEqualSign); + String value = token.substring(indexOfEqualSign + 1); + + if (LABEL.equalsIgnoreCase(key)) + { + propertyType.setLabel(value); + } + } + server.registerPropertyType(sessionToken, propertyType); } }