@Test public void testAllowedGetRepositoryInfo() { Project p = new Project("allowed_grouped_repository_0_1"); p.setIndexed(true); List<RepositoryInfo> result = helper.getRepositoryInfo(p); Assert.assertEquals(1, result.size()); Assert.assertEquals("allowed_grouped_repository_0_1_" + 0, result.get(0).getParent()); }
public List<RepositoryInfo> getRepositoryInfo(Project p) { if (!cfg.isAllowed(p)) { return new ArrayList<>(); } Map<Project, List<RepositoryInfo>> map = cfg.getEnv().getProjectRepositoriesMap(); List<RepositoryInfo> info = map.get(p); return info == null ? new ArrayList<>() : new ArrayList<>(info); }
ProjectHelper { public List<RepositoryInfo> getRepositoryInfo(Project p) { if (!cfg.isAllowed(p)) { return new ArrayList<>(); } Map<Project, List<RepositoryInfo>> map = cfg.getEnv().getProjectRepositoriesMap(); List<RepositoryInfo> info = map.get(p); return info == null ? new ArrayList<>() : new ArrayList<>(info); } }
ProjectHelper { public List<RepositoryInfo> getRepositoryInfo(Project p) { if (!cfg.isAllowed(p)) { return new ArrayList<>(); } Map<Project, List<RepositoryInfo>> map = cfg.getEnv().getProjectRepositoriesMap(); List<RepositoryInfo> info = map.get(p); return info == null ? new ArrayList<>() : new ArrayList<>(info); } private  ProjectHelper(PageConfig cfg); }
ProjectHelper { public List<RepositoryInfo> getRepositoryInfo(Project p) { if (!cfg.isAllowed(p)) { return new ArrayList<>(); } Map<Project, List<RepositoryInfo>> map = cfg.getEnv().getProjectRepositoriesMap(); List<RepositoryInfo> info = map.get(p); return info == null ? new ArrayList<>() : new ArrayList<>(info); } private  ProjectHelper(PageConfig cfg); static ProjectHelper getInstance(PageConfig cfg); List<RepositoryInfo> getRepositoryInfo(Project p); List<RepositoryInfo> getSortedRepositoryInfo(Project p); Set<Group> getGroups(); Set<Project> getProjects(); Set<Project> getRepositories(); Set<Project> getProjects(Group g); Set<Project> getRepositories(Group g); Set<Project> getGroupedProjects(); Set<Project> getGroupedRepositories(); Set<Project> getUngroupedProjects(); Set<Project> getUngroupedRepositories(); Set<Project> getAllGrouped(); Set<Project> getAllGrouped(Group g); Set<Project> getAllUngrouped(); Set<Project> getAllProjects(); Set<Group> getSubgroups(Group g); @SuppressWarnings(value = "unchecked") boolean hasAllowedSubgroup(Group group); @SuppressWarnings(value = "unchecked") boolean hasFavourite(Group group); boolean isFavourite(Project project); boolean hasUngroupedFavourite(); static void cleanup(PageConfig cfg); }
ProjectHelper { public List<RepositoryInfo> getRepositoryInfo(Project p) { if (!cfg.isAllowed(p)) { return new ArrayList<>(); } Map<Project, List<RepositoryInfo>> map = cfg.getEnv().getProjectRepositoriesMap(); List<RepositoryInfo> info = map.get(p); return info == null ? new ArrayList<>() : new ArrayList<>(info); } private  ProjectHelper(PageConfig cfg); static ProjectHelper getInstance(PageConfig cfg); List<RepositoryInfo> getRepositoryInfo(Project p); List<RepositoryInfo> getSortedRepositoryInfo(Project p); Set<Group> getGroups(); Set<Project> getProjects(); Set<Project> getRepositories(); Set<Project> getProjects(Group g); Set<Project> getRepositories(Group g); Set<Project> getGroupedProjects(); Set<Project> getGroupedRepositories(); Set<Project> getUngroupedProjects(); Set<Project> getUngroupedRepositories(); Set<Project> getAllGrouped(); Set<Project> getAllGrouped(Group g); Set<Project> getAllUngrouped(); Set<Project> getAllProjects(); Set<Group> getSubgroups(Group g); @SuppressWarnings(value = "unchecked") boolean hasAllowedSubgroup(Group group); @SuppressWarnings(value = "unchecked") boolean hasFavourite(Group group); boolean isFavourite(Project project); boolean hasUngroupedFavourite(); static void cleanup(PageConfig cfg);  }