Search in sources :

Example 6 with Change

use of org.sonar.api.server.ws.Change in project sonarqube by SonarSource.

the class GhostsAction method define.

@Override
public void define(WebService.NewController context) {
    WebService.NewAction action = context.createAction(ACTION);
    action.setChangelog(new Change("6.4", "The 'uuid' field is deprecated in the response"));
    action.setDescription("List ghost projects.<br /> Requires 'Administer System' permission.").setResponseExample(Resources.getResource(getClass(), "projects-example-ghosts.json")).setSince("5.2").addPagingParams(100, MAX_LIMIT).addFieldsParam(POSSIBLE_FIELDS).addSearchQuery("sonar", "names", "keys").setHandler(this);
    action.createParam(PARAM_ORGANIZATION).setDescription("the organization key").setRequired(false).setInternal(true).setSince("6.3");
}
Also used : WebService(org.sonar.api.server.ws.WebService) Change(org.sonar.api.server.ws.Change)

Example 7 with Change

use of org.sonar.api.server.ws.Change in project sonarqube by SonarSource.

the class CreateAction method define.

@Override
public void define(WebService.NewController context) {
    WebService.NewAction action = context.createAction(ACTION_CREATE).setDescription("Create a project.<br/>" + "Requires 'Create Projects' permission<br/>" + "Since 6.3, the response format has been updated and does not contain the database ID anymore<br/>" + "Since 6.3, the 'key' parameter has been renamed 'project'").setSince("4.0").setPost(true).setResponseExample(getClass().getResource("create-example.json")).setHandler(this);
    action.setChangelog(new Change("6.3", "The response format has been updated and does not contain the database ID anymore"), new Change("6.3", "The 'key' parameter has been renamed 'project'"));
    action.createParam(PARAM_PROJECT).setDescription("Key of the project").setDeprecatedKey(DEPRECATED_PARAM_KEY, "6.3").setRequired(true).setExampleValue(KEY_PROJECT_EXAMPLE_001);
    action.createParam(PARAM_NAME).setDescription("Name of the project").setRequired(true).setExampleValue("SonarQube");
    action.createParam(PARAM_BRANCH).setDescription("SCM Branch of the project. The key of the project will become key:branch, for instance 'SonarQube:branch-5.0'").setExampleValue("branch-5.0");
    support.addOrganizationParam(action);
}
Also used : WebService(org.sonar.api.server.ws.WebService) Change(org.sonar.api.server.ws.Change)

Example 8 with Change

use of org.sonar.api.server.ws.Change in project sonarqube by SonarSource.

the class ProvisionedAction method define.

@Override
public void define(WebService.NewController controller) {
    WebService.NewAction action = controller.createAction("provisioned");
    action.setDescription("Get the list of provisioned projects.<br /> " + "Require 'Create Projects' permission.").setSince("5.2").setResponseExample(Resources.getResource(getClass(), "projects-example-provisioned.json")).setHandler(this).addPagingParams(100, MAX_LIMIT).addSearchQuery("sonar", "names", "keys").addFieldsParam(POSSIBLE_FIELDS);
    action.setChangelog(new Change("6.4", "The 'uuid' field is deprecated in the response"));
    support.addOrganizationParam(action);
}
Also used : WebService(org.sonar.api.server.ws.WebService) Change(org.sonar.api.server.ws.Change)

Example 9 with Change

use of org.sonar.api.server.ws.Change in project sonarqube by SonarSource.

the class SearchMyProjectsAction method define.

@Override
public void define(WebService.NewController context) {
    WebService.NewAction action = context.createAction("search_my_projects").setDescription("Return list of projects for which the current user has 'Administer' permission.").setResponseExample(getClass().getResource("search_my_projects-example.json")).addPagingParams(100, MAX_SIZE).setSince("6.0").setInternal(true).setHandler(this);
    action.setChangelog(new Change("6.4", "The 'id' field is deprecated in the response"));
}
Also used : WebService(org.sonar.api.server.ws.WebService) Change(org.sonar.api.server.ws.Change)

Example 10 with Change

use of org.sonar.api.server.ws.Change in project sonarqube by SonarSource.

the class ShowAction method define.

@Override
public void define(WebService.NewController context) {
    WebService.NewAction action = context.createAction(ACTION_SHOW).setDescription(format("Returns a component (file, directory, project, view…) and its ancestors. " + "The ancestors are ordered from the parent to the root project. " + "The '%s' or '%s' parameter must be provided.<br>" + "Requires the following permission: 'Browse' on the project of the specified component.", PARAM_COMPONENT_ID, PARAM_COMPONENT)).setResponseExample(getClass().getResource("show-example.json")).setSince("5.4").setChangelog(new Change("6.4", "Analysis date has been added to the response")).setChangelog(new Change("6.4", "The field 'id' is deprecated in the response")).setHandler(this);
    action.createParam(PARAM_COMPONENT_ID).setDescription("Component id").setDeprecatedKey("id", "6.4").setDeprecatedSince("6.4").setExampleValue(UUID_EXAMPLE_01);
    action.createParam(PARAM_COMPONENT).setDescription("Component key").setDeprecatedKey("key", "6.4").setExampleValue(KEY_PROJECT_EXAMPLE_001);
}
Also used : WebService(org.sonar.api.server.ws.WebService) Change(org.sonar.api.server.ws.Change)

Aggregations

Change (org.sonar.api.server.ws.Change)10 WebService (org.sonar.api.server.ws.WebService)10