use of net.nemerosa.ontrack.model.exceptions.PropertyTypeNotFoundException in project ontrack by nemerosa.
the class EventController method computeData.
protected Map<String, ?> computeData(Event event) {
// Result
Map<String, ? super Object> result = new HashMap<>();
// Any property in values?
NameValue property = event.getValues().get("property");
if (property != null) {
String propertyName = property.getName();
// Gets the property type by name
try {
PropertyType<?> propertyType = propertyService.getPropertyTypeByName(propertyName);
result.put("property", PropertyTypeDescriptor.of(propertyType));
} catch (PropertyTypeNotFoundException ignored) {
// Logs and ignores
logger.warn("[event] Could not find property type for {}", propertyName);
}
}
// OK
return result;
}
Aggregations