Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

ProfilesWs.java 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2019 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. package org.sonar.server.qualityprofile.ws;
  21. import org.sonar.api.server.ws.WebService;
  22. import org.sonar.server.ws.RemovedWebServiceHandler;
  23. /**
  24. * List of quality profiles WS implemented in Rails.
  25. * New WS on quality profiles MUST be declared in {@link org.sonar.server.qualityprofile.ws.QProfilesWs}
  26. */
  27. public class ProfilesWs implements WebService {
  28. public static final String API_ENDPOINT = "api/profiles";
  29. @Override
  30. public void define(Context context) {
  31. NewController controller = context.createController(API_ENDPOINT)
  32. .setDescription("Removed since 6.3, please use api/qualityprofiles instead")
  33. .setSince("4.4");
  34. defineListAction(controller);
  35. defineIndexAction(controller);
  36. controller.done();
  37. }
  38. private static void defineIndexAction(NewController controller) {
  39. controller.createAction("index")
  40. .setDescription("Get a profile.<br/>" +
  41. "The web service is removed and you're invited to use api/qualityprofiles/search instead")
  42. .setSince("3.3")
  43. .setDeprecatedSince("5.2")
  44. .setHandler(RemovedWebServiceHandler.INSTANCE)
  45. .setResponseExample(RemovedWebServiceHandler.INSTANCE.getResponseExample());
  46. }
  47. private static void defineListAction(NewController controller) {
  48. controller.createAction("list")
  49. .setDescription("Get a list of profiles.<br/>" +
  50. "The web service is removed and you're invited to use api/qualityprofiles/search instead")
  51. .setSince("3.3")
  52. .setDeprecatedSince("5.2")
  53. .setHandler(RemovedWebServiceHandler.INSTANCE)
  54. .setResponseExample(RemovedWebServiceHandler.INSTANCE.getResponseExample());
  55. }
  56. }