@Test public void testGetInstance() { ProjectHelper result = ProjectHelper.getInstance(cfg); Assert.assertNotNull("Project helper should not be null", result); Assert.assertSame(result.getClass(), ProjectHelper.class); }
public static ProjectHelper getInstance(PageConfig cfg) { ProjectHelper instance = (ProjectHelper) cfg.getRequestAttribute(ATTR_NAME); if (instance == null) { instance = new ProjectHelper(cfg); cfg.setRequestAttribute(ATTR_NAME, instance); } return instance; }
ProjectHelper { public static ProjectHelper getInstance(PageConfig cfg) { ProjectHelper instance = (ProjectHelper) cfg.getRequestAttribute(ATTR_NAME); if (instance == null) { instance = new ProjectHelper(cfg); cfg.setRequestAttribute(ATTR_NAME, instance); } return instance; } }
ProjectHelper { public static ProjectHelper getInstance(PageConfig cfg) { ProjectHelper instance = (ProjectHelper) cfg.getRequestAttribute(ATTR_NAME); if (instance == null) { instance = new ProjectHelper(cfg); cfg.setRequestAttribute(ATTR_NAME, instance); } return instance; } private  ProjectHelper(PageConfig cfg); }
ProjectHelper { public static ProjectHelper getInstance(PageConfig cfg) { ProjectHelper instance = (ProjectHelper) cfg.getRequestAttribute(ATTR_NAME); if (instance == null) { instance = new ProjectHelper(cfg); cfg.setRequestAttribute(ATTR_NAME, instance); } return instance; } 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 static ProjectHelper getInstance(PageConfig cfg) { ProjectHelper instance = (ProjectHelper) cfg.getRequestAttribute(ATTR_NAME); if (instance == null) { instance = new ProjectHelper(cfg); cfg.setRequestAttribute(ATTR_NAME, instance); } return instance; } 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);  }