use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class RepositoriesAction method define.
@Override
public void define(WebService.NewController controller) {
NewAction action = controller.createAction("repositories").setDescription("List available rule repositories").setSince("4.5").setHandler(this).setResponseExample(Resources.getResource(getClass(), "example-repositories.json"));
action.createParam(Param.TEXT_QUERY).setDescription("A pattern to match repository keys/names against").setExampleValue("squid");
action.createParam(LANGUAGE).setDescription("A language key; if provided, only repositories for the given language will be returned").setExampleValue("java");
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class UpdateAction method define.
@Override
public void define(NewController context) {
NewAction action = context.createAction("update").setDescription("Update a group.<br>" + "Requires the following permission: 'Administer System'.").setHandler(this).setPost(true).setResponseExample(getClass().getResource("example-update.json")).setSince("5.2");
action.createParam(PARAM_GROUP_ID).setDescription("Identifier of the group.").setExampleValue("42").setRequired(true);
action.createParam(PARAM_GROUP_NAME).setDescription(String.format("New optional name for the group. A group name cannot be larger than %d characters and must be unique. " + "The value 'anyone' (whatever the case) is reserved and cannot be used. If value is empty or not defined, then name is not changed.", GROUP_NAME_MAX_LENGTH)).setExampleValue("sonar-users");
action.createParam(PARAM_GROUP_DESCRIPTION).setDescription(String.format("New optional description for the group. A group description cannot be larger than %d characters. " + "If value is not defined, then description is not changed.", DESCRIPTION_MAX_LENGTH)).setExampleValue("Default group for new users");
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class GroupsAction method define.
@Override
public void define(NewController context) {
NewAction action = context.createAction("groups").setDescription("Lists the groups a user belongs to. Requires Administer System permission.").setHandler(this).setResponseExample(getClass().getResource("example-groups.json")).setSince("5.2");
action.createParam(PARAM_LOGIN).setDescription("A user login").setExampleValue("admin").setRequired(true);
action.addSelectionModeParam();
action.addSearchQuery("users", "group names");
action.addPagingParams(25);
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class AddUserAction method define.
@Override
public void define(NewController context) {
NewAction action = context.createAction("add_user").setDescription(format("Add a user to a group.<br />" + "'%s' or '%s' must be provided.<br />" + "Requires the following permission: 'Administer System'.", PARAM_GROUP_ID, PARAM_GROUP_NAME)).setHandler(this).setPost(true).setSince("5.2");
defineGroupWsParameters(action);
defineLoginWsParameter(action);
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class CreateAction method define.
@Override
public void define(NewController controller) {
NewAction action = controller.createAction("create").setDescription("Create a group.<br>" + "Requires the following permission: 'Administer System'.").setHandler(this).setPost(true).setResponseExample(getClass().getResource("example-create.json")).setSince("5.2");
action.createParam(PARAM_ORGANIZATION_KEY).setDescription("Key of organization. If unset then default organization is used.").setExampleValue("my-org").setSince("6.2").setInternal(true);
action.createParam(PARAM_GROUP_NAME).setDescription(String.format("Name for the new group. A group name cannot be larger than %d characters and must be unique. " + "The value 'anyone' (whatever the case) is reserved and cannot be used.", GROUP_NAME_MAX_LENGTH)).setExampleValue("sonar-users").setRequired(true);
action.createParam(PARAM_GROUP_DESCRIPTION).setDescription(String.format("Description for the new group. A group description cannot be larger than %d characters.", DESCRIPTION_MAX_LENGTH)).setExampleValue("Default group for new users");
}
Aggregations