@Override public Map<String, Attribute> getAttributes(String eventName, String catalogId) { Event event = getEvent(eventName, catalogId); if (event == null) { logger.warn("The event named {} could not be found in catalog {}", eventName, catalogId); return null; } List<EventAttribute> eventAttributes = event.getAttributes() == null ? emptyList() : event.getAttributes(); Map<String, Attribute> attributes = new HashMap<>(eventAttributes.size()); for (EventAttribute eventAttribute : eventAttributes) { Attribute attr = getAttribute(eventAttribute.getName(), event.getCatalogId()); if (attr != null) { attributes.put(attr.getName(), attr); } } return attributes; }
List<String> names = new ArrayList<>(); info.attributes = new HashMap<>(names.size()); if (event.getAttributes() != null) { for (EventAttribute eventAttribute : event.getAttributes()) { String name = eventAttribute.getName(); Attribute attribute = getAttribute(name, event.getCatalogId());
StringBuilder errors = new StringBuilder(); List<EventAttribute> eventAttributes = event.getAttributes() == null ? emptyList() : event.getAttributes(); for (EventAttribute eventAttribute : eventAttributes) { Attribute attr = catalogManager.getAttribute(eventAttribute.getName(), event.getCatalogId());
annotations.append("@MaxLength(").append(maxKeyLength).append(")"); List<EventAttribute> eventAttributes = event.getAttributes(); boolean anyRequired = false; if (eventAttributes != null) { if (event.getAttributes() != null) { Optional<EventAttribute> optional = event.getAttributes().stream().filter(a -> attrName.equals(a.getName())).findFirst(); if (optional.isPresent()) { isRequired = optional.get().isRequired();
List<EventAttribute> eventAttributes = event.getAttributes() != null ? event.getAttributes() : new ArrayList<>(); if (event.getAttributes() != null) { for (EventAttribute eventAttribute : eventAttributes) { EventAttributeModel eventAttributeModel = model.getAttribute(eventAttribute.getName());