use of com.evolveum.midpoint.schema.constants.ObjectTypes in project midpoint by Evolveum.
the class ObjectTypesConverter method getType.
private Set<ObjectTypes> getType(String value) {
Set<ObjectTypes> set = new HashSet<>();
if (StringUtils.isEmpty(value)) {
return set;
}
String[] items = value.split(",");
for (String item : items) {
if (StringUtils.isEmpty(item)) {
continue;
}
boolean found = false;
for (ObjectTypes o : ObjectTypes.values()) {
if (o.name().equalsIgnoreCase(item) || o.getRestType().equalsIgnoreCase(value)) {
set.add(o);
found = true;
}
}
if (!found) {
throw new IllegalArgumentException("Unknown object type " + item);
}
}
return set;
}
Aggregations