@Test public void projects_should_never_be_disabled() throws Exception { SoftwareProjectId softwareProjectId = new SoftwareProjectId("projectId"); boolean isDisabled = sonar.isProjectDisabled(softwareProjectId); assertFalse(isDisabled); }
@Override public boolean isProjectDisabled(SoftwareProjectId softwareProjectId) throws ProjectNotFoundException { checkConnected(); checkSoftwareProjectId(softwareProjectId); try { String artifactId = softwareProjectId.getProjectId(); sonarClient.findProject(artifactId); } catch (SonarProjectNotFoundException e) { throw new ProjectNotFoundException("Can't find if project is disabled, softwareProjectId:" + softwareProjectId + ", url: " + url); } return false; }
SonarConnection implements MetricCapability, TestCapability { @Override public boolean isProjectDisabled(SoftwareProjectId softwareProjectId) throws ProjectNotFoundException { checkConnected(); checkSoftwareProjectId(softwareProjectId); try { String artifactId = softwareProjectId.getProjectId(); sonarClient.findProject(artifactId); } catch (SonarProjectNotFoundException e) { throw new ProjectNotFoundException("Can't find if project is disabled, softwareProjectId:" + softwareProjectId + ", url: " + url); } return false; } }
SonarConnection implements MetricCapability, TestCapability { @Override public boolean isProjectDisabled(SoftwareProjectId softwareProjectId) throws ProjectNotFoundException { checkConnected(); checkSoftwareProjectId(softwareProjectId); try { String artifactId = softwareProjectId.getProjectId(); sonarClient.findProject(artifactId); } catch (SonarProjectNotFoundException e) { throw new ProjectNotFoundException("Can't find if project is disabled, softwareProjectId:" + softwareProjectId + ", url: " + url); } return false; } SonarConnection(); }
SonarConnection implements MetricCapability, TestCapability { @Override public boolean isProjectDisabled(SoftwareProjectId softwareProjectId) throws ProjectNotFoundException { checkConnected(); checkSoftwareProjectId(softwareProjectId); try { String artifactId = softwareProjectId.getProjectId(); sonarClient.findProject(artifactId); } catch (SonarProjectNotFoundException e) { throw new ProjectNotFoundException("Can't find if project is disabled, softwareProjectId:" + softwareProjectId + ", url: " + url); } return false; } SonarConnection(); @Override void connect(String url, String login, String password); @Override Map<String, List<QualityMetric>> getMetricsByCategory(); @Override Map<SoftwareProjectId, String> listSoftwareProjectIds(); @Override void close(); @Override boolean equals(Object o); @Override int hashCode(); @Override String getDescription(SoftwareProjectId softwareProjectId); @Override SoftwareProjectId identify(ProjectKey projectKey); @Override TestResult analyzeUnitTests(SoftwareProjectId projectId); @Override TestResult analyzeIntegrationTests(SoftwareProjectId projectId); @Override QualityResult analyzeQuality(SoftwareProjectId projectId, String... metrics); @Override String getMavenId(SoftwareProjectId softwareProjectId); @Override String getName(SoftwareProjectId softwareProjectId); @Override boolean isClosed(); @Override boolean isProjectDisabled(SoftwareProjectId softwareProjectId); BuildTime getBuildTime(SoftwareProjectId softwareProjectId, Integer buildId); @Deprecated // NOT USED List<Integer> getBuildIds(SoftwareProjectId softwareProjectId); @Deprecated // NOT USED BuildState getBuildState(SoftwareProjectId softwareProjectId, Integer buildId); @Deprecated // NOT USED Date getEstimatedFinishTime(SoftwareProjectId softwareProjectId, Integer buildId); @Deprecated // NOT USED boolean isBuilding(SoftwareProjectId softwareProjectId, Integer buildId); @Deprecated // NOT USED int getLastBuildId(SoftwareProjectId softwareProjectId); @Deprecated // NOT USED List<Commiter> getBuildCommiters(SoftwareProjectId softwareProjectId, Integer buildId); }
SonarConnection implements MetricCapability, TestCapability { @Override public boolean isProjectDisabled(SoftwareProjectId softwareProjectId) throws ProjectNotFoundException { checkConnected(); checkSoftwareProjectId(softwareProjectId); try { String artifactId = softwareProjectId.getProjectId(); sonarClient.findProject(artifactId); } catch (SonarProjectNotFoundException e) { throw new ProjectNotFoundException("Can't find if project is disabled, softwareProjectId:" + softwareProjectId + ", url: " + url); } return false; } SonarConnection(); @Override void connect(String url, String login, String password); @Override Map<String, List<QualityMetric>> getMetricsByCategory(); @Override Map<SoftwareProjectId, String> listSoftwareProjectIds(); @Override void close(); @Override boolean equals(Object o); @Override int hashCode(); @Override String getDescription(SoftwareProjectId softwareProjectId); @Override SoftwareProjectId identify(ProjectKey projectKey); @Override TestResult analyzeUnitTests(SoftwareProjectId projectId); @Override TestResult analyzeIntegrationTests(SoftwareProjectId projectId); @Override QualityResult analyzeQuality(SoftwareProjectId projectId, String... metrics); @Override String getMavenId(SoftwareProjectId softwareProjectId); @Override String getName(SoftwareProjectId softwareProjectId); @Override boolean isClosed(); @Override boolean isProjectDisabled(SoftwareProjectId softwareProjectId); BuildTime getBuildTime(SoftwareProjectId softwareProjectId, Integer buildId); @Deprecated // NOT USED List<Integer> getBuildIds(SoftwareProjectId softwareProjectId); @Deprecated // NOT USED BuildState getBuildState(SoftwareProjectId softwareProjectId, Integer buildId); @Deprecated // NOT USED Date getEstimatedFinishTime(SoftwareProjectId softwareProjectId, Integer buildId); @Deprecated // NOT USED boolean isBuilding(SoftwareProjectId softwareProjectId, Integer buildId); @Deprecated // NOT USED int getLastBuildId(SoftwareProjectId softwareProjectId); @Deprecated // NOT USED List<Commiter> getBuildCommiters(SoftwareProjectId softwareProjectId, Integer buildId);  }