List of usage examples for org.apache.commons.collections15 CollectionUtils isSubCollection
public static <E> boolean isSubCollection(final Iterable<? extends E> a, final Iterable<? extends E> b)
From source file:edu.northwestern.bioinformatics.studycalendar.web.dashboard.DashboardCommand.java
public boolean getHasHiddenInformation() { if (!isColleagueDashboard()) { return false; } else if (dashboardUser.getMembership(STUDY_SUBJECT_CALENDAR_MANAGER) == null) { return false; } else if (loggedInUser.getMembership(STUDY_SUBJECT_CALENDAR_MANAGER) == null) { return true; }//from w w w.ja v a 2 s . c o m Collection<Integer> possibleDashboardStudies = studyDao .getVisibleStudyIds(getUser().getVisibleStudyParameters(STUDY_SUBJECT_CALENDAR_MANAGER)); Collection<Integer> visibleStudies = studyDao .getVisibleStudyIds(loggedInUser.getVisibleStudyParameters(STUDY_SUBJECT_CALENDAR_MANAGER)); if (!CollectionUtils.isSubCollection(possibleDashboardStudies, visibleStudies)) { return true; } Collection<Integer> possibleDashboardAssignments = pscUserService.getVisibleAssignmentIds(getUser(), STUDY_SUBJECT_CALENDAR_MANAGER); Collection<Integer> visibleAssignments = pscUserService.getVisibleAssignmentIds(loggedInUser, STUDY_SUBJECT_CALENDAR_MANAGER); return !CollectionUtils.isSubCollection(possibleDashboardAssignments, visibleAssignments); }