final List<Announcement> announcementsToShow = new ArrayList<Announcement>();  for (final AnnouncementBoard board : getLoggedPerson(request).getBookmarkedBoards()) { if (board.hasReader(getLoggedPerson(request)) || board.hasWriter(getLoggedPerson(request))) { announcementsToShow.addAll(board.getVisibleAnnouncements()); } }
final List<Announcement> result = new ArrayList<Announcement>(); final AnnouncementsStartPageForm form = (AnnouncementsStartPageForm) actionForm;  if (form.getBoardType().equals("BOOKMARKED")) { for (final AnnouncementBoard board : getLoggedPerson(request).getBookmarkedBoards()) { addBoardAnnouncements(request, result, board); } } else if (form.getBoardType().equals("INSTITUTIONAL")) { for (final AnnouncementBoard board : rootDomainObject.getInstitutionUnit().getBoardsSet()) { addBoardAnnouncements(request, result, board); } }
    private List<Announcement> getAnnouncementsToShow(HttpServletRequest request, ActionForm actionForm) {	        final List<Announcement> announcementsToShow = new ArrayList<Announcement>();                for (final AnnouncementBoard board : getLoggedPerson(request).getBookmarkedBoards()) {            if (board.hasReader(getLoggedPerson(request)) || board.hasWriter(getLoggedPerson(request))) {        	announcementsToShow.addAll(board.getVisibleAnnouncements());            }        }        for (final AnnouncementBoard board : rootDomainObject.getAnnouncementBoards()) {            if (board.getMandatory() && (board.hasReader(getLoggedPerson(request)) || board.hasWriter(getLoggedPerson(request)))) {        	announcementsToShow.addAll(board.getVisibleAnnouncements());            }        }        final AnnouncementsStartPageForm form = (AnnouncementsStartPageForm) actionForm;        Collections.sort(announcementsToShow, Announcement.NEWEST_FIRST);        return announcementsToShow.subList(0, Math.min(form.getHowManyAnnouncementsToShow(), announcementsToShow.size()));    }