inheritance.createParam(PARAM_PARENT_KEY)
.setDescription("The key of the new parent profile. If this parameter is set, parentName must not be set. " +
"If both are left empty, the inheritance link with current parent profile (if any) is broken, which deactivates all rules " +
- "which come from the parent and are not overridden.")
+ "which come from the parent and are not overridden. Require Administer Quality Profiles permission.")
.setExampleValue("sonar-way-java-12345");
inheritance.createParam(PARAM_PARENT_NAME)
.setDescription("A quality profile name. If this parameter is set, profileKey must not be set and language must be set to disambiguate.")
public void define(WebService.NewController controller) {
NewAction setDefault = controller.createAction("copy")
.setSince("5.2")
- .setDescription("Copy a quality profile.")
+ .setDescription("Copy a quality profile. Require Administer Quality Profiles permission.")
.setPost(true)
.setHandler(this);
public void define(WebService.NewController controller) {
NewAction create = controller.createAction("create")
.setSince("5.2")
- .setDescription("Create a quality profile.")
+ .setDescription("Create a quality profile. Require Administer Quality Profiles permission.")
.setPost(true)
.setResponseExample(getClass().getResource("example-create.json"))
.setHandler(this);
@Override
public void define(NewController controller) {
NewAction action = controller.createAction("delete")
- .setDescription("Delete a quality profile and all its descendants. The default quality profile cannot be deleted.")
+ .setDescription("Delete a quality profile and all its descendants. The default quality profile cannot be deleted. " +
+ "Require Administer Quality Profiles permission.")
.setSince("5.2")
.setPost(true)
.setHandler(this);
QProfileIdentificationParamUtils.defineProfileParams(action, languages);
}
-
@Override
public void handle(Request request, Response response) throws Exception {
userSession.checkLoggedIn();
userSession.checkPermission(GlobalPermissions.QUALITY_PROFILE_ADMIN);
-
DbSession session = dbClient.openSession(false);
try {
String profileKey = QProfileIdentificationParamUtils.getProfileKeyFromParameters(request, profileFactory, session);
public void define(WebService.NewController controller) {
controller.createAction("restore")
.setSince("5.2")
- .setDescription("Restore a quality profile using an XML file. The restored profile name is taken from the backup file, "
- + "so if a profile with the same name and language already exists, it will be overwritten.")
+ .setDescription("Restore a quality profile using an XML file. The restored profile name is taken from the backup file, " +
+ "so if a profile with the same name and language already exists, it will be overwritten. " +
+ "Require Administer Quality Profiles permission.")
.setPost(true)
.setInternal(true)
.setHandler(this)
public void define(WebService.NewController controller) {
NewAction setDefault = controller.createAction("rename")
.setSince("5.2")
- .setDescription("Rename a quality profile.")
+ .setDescription("Rename a quality profile. Require Administer Quality Profiles permission.")
.setPost(true)
.setHandler(this);
public void define(WebService.NewController controller) {
controller.createAction("restore")
.setSince("5.2")
- .setDescription("Restore a quality profile using an XML file. The restored profile name is taken from the backup file, "
- + "so if a profile with the same name and language already exists, it will be overwritten.")
+ .setDescription("Restore a quality profile using an XML file. The restored profile name is taken from the backup file, " +
+ "so if a profile with the same name and language already exists, it will be overwritten. " +
+ "Require Administer Quality Profiles permission.")
.setPost(true)
.setHandler(this)
.createParam(PARAM_BACKUP)
public void define(WebService.NewController controller) {
NewAction setDefault = controller.createAction("set_default")
.setSince("5.2")
- .setDescription("Select the default profile for a given language.")
+ .setDescription("Select the default profile for a given language. Require Administer Quality Profiles permission.")
.setPost(true)
.setHandler(this);