diff options
author | Daniel Schwarz <daniel.schwarz@sonarsource.com> | 2017-11-30 11:24:21 +0100 |
---|---|---|
committer | Daniel Schwarz <bartfastiel@users.noreply.github.com> | 2017-12-06 14:40:17 +0100 |
commit | c84c9ce7619fc312374583ccd8510024a5b1c75c (patch) | |
tree | 82c153303f4fea96cdac6941d4f9f5236d719b36 /sonar-ws/src | |
parent | 90bce89957539918e4f10e44e94ff3b8aa920995 (diff) | |
download | sonarqube-c84c9ce7619fc312374583ccd8510024a5b1c75c.tar.gz sonarqube-c84c9ce7619fc312374583ccd8510024a5b1c75c.zip |
Deprecate old service classes in WsClient, add replacement methods
Diffstat (limited to 'sonar-ws/src')
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java | 106 | ||||
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java | 58 |
2 files changed, 130 insertions, 34 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java index 7ae83705d7a..9bf77e9cde0 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java @@ -20,19 +20,22 @@ package org.sonarqube.ws.client; import org.sonarqube.ws.client.ce.CeService; -import org.sonarqube.ws.client.component.ComponentsService; +import org.sonarqube.ws.client.components.ComponentsService; import org.sonarqube.ws.client.favorites.FavoritesService; -import org.sonarqube.ws.client.issue.IssuesService; -import org.sonarqube.ws.client.measure.MeasuresService; +import org.sonarqube.ws.client.issues.IssuesService; +import org.sonarqube.ws.client.measures.MeasuresService; import org.sonarqube.ws.client.notifications.NotificationsService; import org.sonarqube.ws.client.organization.OrganizationService; -import org.sonarqube.ws.client.permission.PermissionsService; +import org.sonarqube.ws.client.organizations.OrganizationsService; +import org.sonarqube.ws.client.permissions.PermissionsService; import org.sonarqube.ws.client.project.ProjectsService; +import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService; import org.sonarqube.ws.client.projectanalysis.ProjectAnalysisService; import org.sonarqube.ws.client.projectbranches.ProjectBranchesService; import org.sonarqube.ws.client.projectlinks.ProjectLinksService; import org.sonarqube.ws.client.qualitygates.QualitygatesService; import org.sonarqube.ws.client.qualityprofile.QualityProfilesService; +import org.sonarqube.ws.client.qualityprofiles.QualityprofilesService; import org.sonarqube.ws.client.roots.RootsService; import org.sonarqube.ws.client.rules.RulesService; import org.sonarqube.ws.client.settings.SettingsService; @@ -51,17 +54,23 @@ import org.sonarqube.ws.client.webhooks.WebhooksService; class DefaultWsClient implements WsClient { private final WsConnector wsConnector; - private final OrganizationService organizations; - private final PermissionsService permissionsService; - private final ComponentsService componentsService; + private final OrganizationService organizationsOld; + private final OrganizationsService organizations; + private final org.sonarqube.ws.client.permission.PermissionsService permissionsOld; + private final PermissionsService permissions; + private final org.sonarqube.ws.client.component.ComponentsService componentsOld; + private final ComponentsService components; private final FavoritesService favoritesService; - private final QualityProfilesService qualityProfilesService; - private final IssuesService issuesService; + private final QualityProfilesService qualityProfilesOld; + private final QualityprofilesService qualityprofiles; + private final org.sonarqube.ws.client.issue.IssuesService issuesOld; + private final IssuesService issues; private final UsersService usersService; private final UserGroupsService userGroupsService; private final UserTokensService userTokensService; private final QualitygatesService qualityGatesService; - private final MeasuresService measuresService; + private final org.sonarqube.ws.client.measure.MeasuresService measuresOld; + private final MeasuresService measures; private final SystemService systemService; private final CeService ceService; private final RulesService rulesService; @@ -70,23 +79,30 @@ class DefaultWsClient implements WsClient { private final SettingsService settingsService; private final RootsService rootsService; private final WebhooksService webhooksService; - private final ProjectAnalysisService projectAnalysisService; + private final ProjectAnalysisService projectAnalysisOld; + private final ProjectAnalysesService projectAnalyses; private final NotificationsService notificationsService; private final ProjectBranchesService projectBranchesService; DefaultWsClient(WsConnector wsConnector) { this.wsConnector = wsConnector; - this.organizations = new OrganizationService(wsConnector); - this.permissionsService = new PermissionsService(wsConnector); - this.componentsService = new ComponentsService(wsConnector); + this.organizationsOld = new OrganizationService(wsConnector); + this.organizations = new OrganizationsService(wsConnector); + this.permissionsOld = new org.sonarqube.ws.client.permission.PermissionsService(wsConnector); + this.permissions = new PermissionsService(wsConnector); + this.componentsOld = new org.sonarqube.ws.client.component.ComponentsService(wsConnector); + this.components = new ComponentsService(wsConnector); this.favoritesService = new FavoritesService(wsConnector); - this.qualityProfilesService = new QualityProfilesService(wsConnector); - this.issuesService = new IssuesService(wsConnector); + this.qualityProfilesOld = new QualityProfilesService(wsConnector); + this.qualityprofiles = new QualityprofilesService(wsConnector); + this.issuesOld = new org.sonarqube.ws.client.issue.IssuesService(wsConnector); + this.issues = new IssuesService(wsConnector); this.usersService = new UsersService(wsConnector); this.userGroupsService = new UserGroupsService(wsConnector); this.userTokensService = new UserTokensService(wsConnector); this.qualityGatesService = new QualitygatesService(wsConnector); - this.measuresService = new MeasuresService(wsConnector); + this.measuresOld = new org.sonarqube.ws.client.measure.MeasuresService(wsConnector); + this.measures = new MeasuresService(wsConnector); this.systemService = new SystemService(wsConnector); this.ceService = new CeService(wsConnector); this.rulesService = new RulesService(wsConnector); @@ -95,7 +111,8 @@ class DefaultWsClient implements WsClient { this.settingsService = new SettingsService(wsConnector); this.rootsService = new RootsService(wsConnector); this.webhooksService = new WebhooksService(wsConnector); - this.projectAnalysisService = new ProjectAnalysisService(wsConnector); + this.projectAnalysisOld = new ProjectAnalysisService(wsConnector); + this.projectAnalyses = new ProjectAnalysesService(wsConnector); this.projectBranchesService = new ProjectBranchesService(wsConnector); this.notificationsService = new NotificationsService(wsConnector); } @@ -106,18 +123,33 @@ class DefaultWsClient implements WsClient { } @Override - public OrganizationService organizations() { + public OrganizationService organizationsOld() { + return organizationsOld; + } + + @Override + public OrganizationsService organizations() { return organizations; } @Override + public org.sonarqube.ws.client.permission.PermissionsService permissionsOld() { + return this.permissionsOld; + } + + @Override public PermissionsService permissions() { - return this.permissionsService; + return permissions; + } + + @Override + public org.sonarqube.ws.client.component.ComponentsService componentsOld() { + return componentsOld; } @Override public ComponentsService components() { - return componentsService; + return components; } @Override @@ -126,13 +158,23 @@ class DefaultWsClient implements WsClient { } @Override - public QualityProfilesService qualityProfiles() { - return qualityProfilesService; + public QualityProfilesService qualityProfilesOld() { + return qualityProfilesOld; + } + + @Override + public QualityprofilesService qualityProfiles() { + return qualityprofiles; + } + + @Override + public org.sonarqube.ws.client.issue.IssuesService issuesOld() { + return issuesOld; } @Override public IssuesService issues() { - return issuesService; + return issues; } @Override @@ -156,8 +198,13 @@ class DefaultWsClient implements WsClient { } @Override + public org.sonarqube.ws.client.measure.MeasuresService measuresOld() { + return measuresOld; + } + + @Override public MeasuresService measures() { - return measuresService; + return measures; } @Override @@ -201,8 +248,13 @@ class DefaultWsClient implements WsClient { } @Override - public ProjectAnalysisService projectAnalysis() { - return projectAnalysisService; + public ProjectAnalysisService projectAnalysisOld() { + return projectAnalysisOld; + } + + @Override + public ProjectAnalysesService projectAnalyses() { + return projectAnalyses; } @Override diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java index 96c20272caf..c6d200e935d 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java @@ -20,19 +20,22 @@ package org.sonarqube.ws.client; import org.sonarqube.ws.client.ce.CeService; -import org.sonarqube.ws.client.component.ComponentsService; +import org.sonarqube.ws.client.components.ComponentsService; import org.sonarqube.ws.client.favorites.FavoritesService; -import org.sonarqube.ws.client.issue.IssuesService; -import org.sonarqube.ws.client.measure.MeasuresService; +import org.sonarqube.ws.client.issues.IssuesService; +import org.sonarqube.ws.client.measures.MeasuresService; import org.sonarqube.ws.client.notifications.NotificationsService; import org.sonarqube.ws.client.organization.OrganizationService; -import org.sonarqube.ws.client.permission.PermissionsService; +import org.sonarqube.ws.client.organizations.OrganizationsService; +import org.sonarqube.ws.client.permissions.PermissionsService; import org.sonarqube.ws.client.project.ProjectsService; +import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService; import org.sonarqube.ws.client.projectanalysis.ProjectAnalysisService; import org.sonarqube.ws.client.projectbranches.ProjectBranchesService; import org.sonarqube.ws.client.projectlinks.ProjectLinksService; import org.sonarqube.ws.client.qualitygates.QualitygatesService; import org.sonarqube.ws.client.qualityprofile.QualityProfilesService; +import org.sonarqube.ws.client.qualityprofiles.QualityprofilesService; import org.sonarqube.ws.client.roots.RootsService; import org.sonarqube.ws.client.rules.RulesService; import org.sonarqube.ws.client.settings.SettingsService; @@ -61,19 +64,50 @@ import org.sonarqube.ws.client.webhooks.WebhooksService; * @since 5.3 */ public interface WsClient { - OrganizationService organizations(); + + /** + * @deprecated since 7.0 use {@link #organizations()} instead + */ + @Deprecated + OrganizationService organizationsOld(); + + OrganizationsService organizations(); + + /** + * @deprecated since 7.0 use {@link #components()} instead + */ + @Deprecated + org.sonarqube.ws.client.component.ComponentsService componentsOld(); ComponentsService components(); FavoritesService favorites(); + /** + * @deprecated since 7.0 use {@link #issues()} instead + */ + @Deprecated + org.sonarqube.ws.client.issue.IssuesService issuesOld(); + IssuesService issues(); NotificationsService notifications(); + /** + * @deprecated since 7.0 use {@link #permissions()} instead + */ + @Deprecated + org.sonarqube.ws.client.permission.PermissionsService permissionsOld(); + PermissionsService permissions(); - QualityProfilesService qualityProfiles(); + /** + * @deprecated since 7.0 use {@link #qualityProfiles()} instead + */ + @Deprecated + QualityProfilesService qualityProfilesOld(); + + QualityprofilesService qualityProfiles(); UsersService users(); @@ -83,6 +117,12 @@ public interface WsClient { QualitygatesService qualityGates(); + /** + * @deprecated since 7.0 use {@link #measures()} instead + */ + @Deprecated + org.sonarqube.ws.client.measure.MeasuresService measuresOld(); + MeasuresService measures(); SystemService system(); @@ -120,8 +160,12 @@ public interface WsClient { /** * @since 6.3 + * @deprecated since 7.0 use {@link #projectAnalyses()} instead */ - ProjectAnalysisService projectAnalysis(); + @Deprecated + ProjectAnalysisService projectAnalysisOld(); + + ProjectAnalysesService projectAnalyses(); /** * @since 6.6> |