@Override public Object execute() throws Exception { List<String> ids = new ArrayList<>(profileService.getProfiles()); Collections.sort(ids); ShellTable table = new ShellTable(); table.column("id"); table.column("parents"); for (String id : ids) { Profile profile = profileService.getProfile(id); if (profile != null && (hidden || !profile.isHidden())) { String parents = join(" ", profile.getParentIds()); table.addRow().addContent(id, parents); } } table.print(System.out); return null; }
@Override public Object execute() throws Exception { List<String> ids = new ArrayList<>(profileService.getProfiles()); Collections.sort(ids); ShellTable table = new ShellTable(); table.column("id"); table.column("parents"); for (String id : ids) { Profile profile = profileService.getProfile(id); if (profile != null && (hidden || !profile.isHidden())) { String parents = join(" ", profile.getParentIds()); table.addRow().addContent(id, parents); } } table.print(System.out); return null; }