public static Status getSummaryStatus(Map<String, Status> statuses) { Level level = Level.OK; StringBuilder msg = new StringBuilder(); for (Map.Entry<String, Status> entry : statuses.entrySet()) { String key = entry.getKey(); Status status = entry.getValue(); Level l = status.getLevel(); if (Level.ERROR.equals(l)) { level = Level.ERROR; if (msg.length() > 0) { msg.append(","); } msg.append(key); } else if (Level.WARN.equals(l)) { if (!Level.ERROR.equals(level)) { level = Level.WARN; } if (msg.length() > 0) { msg.append(","); } msg.append(key); } } return new Status(level, msg.toString()); }
public static Status getSummaryStatus(Map<String, Status> statuses) { Level level = Level.OK; StringBuilder msg = new StringBuilder(); for (Map.Entry<String, Status> entry : statuses.entrySet()) { String key = entry.getKey(); Status status = entry.getValue(); Level l = status.getLevel(); if (Level.ERROR.equals(l)) { level = Level.ERROR; if (msg.length() > 0) { msg.append(","); } msg.append(key); } else if (Level.WARN.equals(l)) { if (!Level.ERROR.equals(level)) { level = Level.WARN; } if (msg.length() > 0) { msg.append(","); } msg.append(key); } } return new Status(level, msg.toString()); }
if (stat.getLevel() != null && stat.getLevel() != Status.Level.UNKNOWN) { List<String> row = new ArrayList<String>(); row.add(name); row.add(String.valueOf(stat.getLevel())); row.add(stat.getMessage() == null ? "" : stat.getMessage()); table.add(row); List<String> row = new ArrayList<String>(); row.add("summary"); row.add(String.valueOf(stat.getLevel())); row.add(stat.getMessage()); table.add(row); return String.valueOf(stat.getLevel());
if (stat.getLevel() != null && stat.getLevel() != Status.Level.UNKNOWN) { List<String> row = new ArrayList<String>(); row.add(name); row.add(String.valueOf(stat.getLevel())); row.add(stat.getMessage() == null ? "" : stat.getMessage()); table.add(row); List<String> row = new ArrayList<String>(); row.add("summary"); row.add(String.valueOf(stat.getLevel())); row.add(stat.getMessage()); table.add(row); return String.valueOf(stat.getLevel());
public static Status getSummaryStatus(Map<String, Status> statuses) { Level level = Level.OK; StringBuilder msg = new StringBuilder(); for (Map.Entry<String, Status> entry : statuses.entrySet()) { String key = entry.getKey(); Status status = entry.getValue(); Level l = status.getLevel(); if (Level.ERROR.equals(l)) { level = Level.ERROR; if (msg.length() > 0) { msg.append(","); } msg.append(key); } else if (Level.WARN.equals(l)) { if (!Level.ERROR.equals(level)) { level = Level.WARN; } if (msg.length() > 0) { msg.append(","); } msg.append(key); } } return new Status(level, msg.toString()); }
public static Status getSummaryStatus(Map<String, Status> statuses) { Level level = Level.OK; StringBuilder msg = new StringBuilder(); for (Map.Entry<String, Status> entry : statuses.entrySet()) { String key = entry.getKey(); Status status = entry.getValue(); Level l = status.getLevel(); if (Level.ERROR.equals(l)) { level = Level.ERROR; if (msg.length() > 0) { msg.append(","); } msg.append(key); } else if (Level.WARN.equals(l)) { if (!Level.ERROR.equals(level)) { level = Level.WARN; } if (msg.length() > 0) { msg.append(","); } msg.append(key); } } return new Status(level, msg.toString()); }
if (stat.getLevel() != null && stat.getLevel() != Status.Level.UNKNOWN) { List<String> row = new ArrayList<String>(); row.add(name); row.add(String.valueOf(stat.getLevel())); row.add(stat.getMessage() == null ? "" : stat.getMessage()); table.add(row); List<String> row = new ArrayList<String>(); row.add("summary"); row.add(String.valueOf(stat.getLevel())); row.add(stat.getMessage()); table.add(row); return String.valueOf(stat.getLevel());
if (stat.getLevel() != null && stat.getLevel() != Status.Level.UNKNOWN) { List<String> row = new ArrayList<String>(); row.add(name); row.add(String.valueOf(stat.getLevel())); row.add(stat.getMessage() == null ? "" : stat.getMessage()); table.add(row); List<String> row = new ArrayList<String>(); row.add("summary"); row.add(String.valueOf(stat.getLevel())); row.add(stat.getMessage()); table.add(row); return String.valueOf(stat.getLevel());