public String findIcon(final String family, final ComponentIndices componentIndices) { return componentIndices .getComponents() .stream() .filter(component -> component.getId().getFamilyId().equals(family)) .findFirst() .orElseThrow(() -> new WebApplicationException(Response .status(HTTP_INTERNAL_ERROR) .entity(new ProxyErrorPayload("UNEXPECTED", "No icon found for this configuration family " + family)) .header(ErrorProcessor.Constants.HEADER_TALEND_COMPONENT_SERVER_ERROR, false) .build())) .getIconFamily() .getIcon(); }
meta.getParent().getName(), meta.getName()), meta.findBundle(loader, locale).displayName().orElse(meta.getName()), familyDisplayName, new Icon(icon, iconContent == null ? null : iconContent.getType(), !includeIcon ? null : (iconContent == null ? null : iconContent.getBytes())), new Icon(familyIcon, iconFamilyContent == null ? null : iconFamilyContent.getType(), !includeIcon ? null : (iconFamilyContent == null ? null : iconFamilyContent.getBytes())), meta.getVersion(), categories, singletonList(new Link("Detail",