Browse Source

SONAR-11184 Deprecate custom measure feature

tags/7.5
Julien Lancelot 5 years ago
parent
commit
80418249fe

+ 1
- 0
server/sonar-server/src/main/java/org/sonar/server/measure/custom/ws/CreateAction.java View File

"The project id or the project key must be provided (only project and module custom measures can be created). The metric id or the metric key must be provided.<br/>" + "The project id or the project key must be provided (only project and module custom measures can be created). The metric id or the metric key must be provided.<br/>" +
"Requires 'Administer' permission on the project.") "Requires 'Administer' permission on the project.")
.setSince("5.2") .setSince("5.2")
.setDeprecatedSince("7.4")
.setPost(true) .setPost(true)
.setHandler(this); .setHandler(this);



+ 2
- 1
server/sonar-server/src/main/java/org/sonar/server/measure/custom/ws/CustomMeasuresWs.java View File

@Override @Override
public void define(Context context) { public void define(Context context) {
NewController controller = context.createController(ENDPOINT) NewController controller = context.createController(ENDPOINT)
.setDescription("Manage custom measures for a project. See also api/metrics.")
.setDescription("Manage custom measures for a project. See also api/metrics.<br/>" +
"Custom measures are deprecated. Please use projects tags instead.")
.setSince("5.2"); .setSince("5.2");


for (CustomMeasuresWsAction action : actions) { for (CustomMeasuresWsAction action : actions) {

+ 1
- 0
server/sonar-server/src/main/java/org/sonar/server/measure/custom/ws/DeleteAction.java View File

.setPost(true) .setPost(true)
.setHandler(this) .setHandler(this)
.setSince("5.2") .setSince("5.2")
.setDeprecatedSince("7.4")
.setDescription("Delete a custom measure.<br /> Requires 'Administer System' permission or 'Administer' permission on the project."); .setDescription("Delete a custom measure.<br /> Requires 'Administer System' permission or 'Administer' permission on the project.");


action.createParam(PARAM_ID) action.createParam(PARAM_ID)

+ 1
- 0
server/sonar-server/src/main/java/org/sonar/server/measure/custom/ws/MetricsAction.java View File

public void define(WebService.NewController context) { public void define(WebService.NewController context) {
WebService.NewAction action = context.createAction(ACTION) WebService.NewAction action = context.createAction(ACTION)
.setSince("5.2") .setSince("5.2")
.setDeprecatedSince("7.4")
.setInternal(true) .setInternal(true)
.setHandler(this) .setHandler(this)
.setResponseExample(Resources.getResource(getClass(), "example-metrics.json")) .setResponseExample(Resources.getResource(getClass(), "example-metrics.json"))

+ 1
- 0
server/sonar-server/src/main/java/org/sonar/server/measure/custom/ws/SearchAction.java View File

.setDescription("List custom measures. The project id or project key must be provided.<br />" + .setDescription("List custom measures. The project id or project key must be provided.<br />" +
"Requires 'Administer System' permission or 'Administer' permission on the project.") "Requires 'Administer System' permission or 'Administer' permission on the project.")
.setSince("5.2") .setSince("5.2")
.setDeprecatedSince("7.4")
.addFieldsParam(CustomMeasureJsonWriter.OPTIONAL_FIELDS) .addFieldsParam(CustomMeasureJsonWriter.OPTIONAL_FIELDS)
.addPagingParams(100, MAX_LIMIT) .addPagingParams(100, MAX_LIMIT)
.setResponseExample(getClass().getResource("example-search.json")) .setResponseExample(getClass().getResource("example-search.json"))

+ 2
- 1
server/sonar-server/src/main/java/org/sonar/server/measure/custom/ws/UpdateAction.java View File

.setDescription("Update a custom measure. Value and/or description must be provided<br />" + .setDescription("Update a custom measure. Value and/or description must be provided<br />" +
"Requires 'Administer System' permission or 'Administer' permission on the project.") "Requires 'Administer System' permission or 'Administer' permission on the project.")
.setHandler(this) .setHandler(this)
.setSince("5.2");
.setSince("5.2")
.setDeprecatedSince("7.4");


action.createParam(PARAM_ID) action.createParam(PARAM_ID)
.setRequired(true) .setRequired(true)

+ 5
- 0
sonar-ws/src/main/java/org/sonarqube/ws/client/custommeasures/CustomMeasuresService.java View File

* This is a POST request. * This is a POST request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/create">Further information about this action online (including a response example)</a> * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/create">Further information about this action online (including a response example)</a>
* @since 5.2 * @since 5.2
* @deprecated since 7.4
*/ */
public void create(CreateRequest request) { public void create(CreateRequest request) {
call( call(
* This is a POST request. * This is a POST request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/delete">Further information about this action online (including a response example)</a> * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/delete">Further information about this action online (including a response example)</a>
* @since 5.2 * @since 5.2
* @deprecated since 7.4
*/ */
public void delete(DeleteRequest request) { public void delete(DeleteRequest request) {
call( call(
* This is a GET request. * This is a GET request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/metrics">Further information about this action online (including a response example)</a> * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/metrics">Further information about this action online (including a response example)</a>
* @since 5.2 * @since 5.2
* @deprecated since 7.4
*/ */
public String metrics(MetricsRequest request) { public String metrics(MetricsRequest request) {
return call( return call(
* This is a GET request. * This is a GET request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/search">Further information about this action online (including a response example)</a> * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/search">Further information about this action online (including a response example)</a>
* @since 5.2 * @since 5.2
* @deprecated since 7.4
*/ */
public String search(SearchRequest request) { public String search(SearchRequest request) {
return call( return call(
* This is a POST request. * This is a POST request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/update">Further information about this action online (including a response example)</a> * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/update">Further information about this action online (including a response example)</a>
* @since 5.2 * @since 5.2
* @deprecated since 7.4
*/ */
public void update(UpdateRequest request) { public void update(UpdateRequest request) {
call( call(

Loading…
Cancel
Save