type = NodeProperty.Type.CATEGORY;
}
break;
}
NodePropertyDescriptor descriptor = new NodePropertyDescriptor(itemDef.getName(), itemDef
.getLabel(locale != null ? locale : Locale.ENGLISH, nodeType), type);
descriptor.setMultiple(propDef.isMultiple());
if (propDef.getValueConstraints().length > 0) {
descriptor.setConstrained(true);
descriptor.setAllowedValues(propDef.getValueConstraints());
}
descriptor.setSelectorOptions(propDefExt.getSelectorOptions());
// TODO handle multiple default values
Value[] defaultValues = propDef.getDefaultValues();
if (defaultValues != null && defaultValues.length > 0) {
descriptor.setDefaultValue(defaultValues[0].getString());
}
return descriptor;
}