/** * Extracts the groups from a collection of group folders. * * @param groupFolders the group folders * @return the groups * @throws GitLabApiException if the connection against GitLab failed */ private Collection<GitLabGroupInfo> getGroupsFromFolders(Collection<GroupFolderInfo> groupFolders) throws GitLabApiException { List<GitLabGroupInfo> groups = new ArrayList<GitLabGroupInfo>(); for (GroupFolderInfo groupFolder : groupFolders) { groups.add(groupFolder.getGroup()); } return groups; }
/** * Checks whether a group folder should be included. * * @param groupFolder the group folder * @return true if the group folder should be included */ private boolean managesGroupFolder(GroupFolderInfo groupFolder) throws GitLabApiException { GitLabGroupInfo group = groupFolder.getGroup(); return managesGroupPredicate == null || (group != null && managesGroupPredicate.shouldManageGroup(group)); }