diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-03-05 15:52:40 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-03-05 15:52:40 +0100 |
commit | 7509fbafb262c92c3603d5b17387c232a5748327 (patch) | |
tree | d7c7359ce5a47aee35aaad1b9630c29f913d7fda /sonar-plugin-api | |
parent | 44358a409c99771fe1a8e2bfb64b221a70303b31 (diff) | |
download | sonarqube-7509fbafb262c92c3603d5b17387c232a5748327.tar.gz sonarqube-7509fbafb262c92c3603d5b17387c232a5748327.zip |
SONAR-4069 Remove Task and TaskDefinition from API.
Feature is postponed to version 3.6.
Diffstat (limited to 'sonar-plugin-api')
4 files changed, 7 insertions, 116 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/task/Task.java b/sonar-plugin-api/src/main/java/org/sonar/api/task/Task.java deleted file mode 100644 index 42bfdddcaac..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/task/Task.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2012 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.api.task; - - -/** - * Implement this interface to provide the behavior of a task. - * @since 3.5 - */ -public interface Task extends TaskExtension { - - void execute(); - -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskComponent.java b/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskComponent.java index 346b8bcf351..3640ac79475 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskComponent.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskComponent.java @@ -19,11 +19,13 @@ */ package org.sonar.api.task; +import com.google.common.annotations.Beta; + /** - * Dependency Injection : all the classes implementing this interface are available in the task IoC container. - * Just add a parameter to the constructor of your component. + * EXPERIMENTAL - DO NOT USE * * @since 3.5 */ +@Beta public interface TaskComponent { } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskDefinition.java b/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskDefinition.java deleted file mode 100644 index 2d7d595bd78..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskDefinition.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2012 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.api.task; - -/** - * Implement this interface to provide a new task. - * @since 3.5 - */ -public class TaskDefinition implements TaskComponent { - - private String name; - private String description; - private String command; - private Class<? extends Task> task; - - private TaskDefinition() { - - } - - public static TaskDefinition create() { - return new TaskDefinition(); - } - - public String getName() { - return name; - } - - public TaskDefinition setName(String name) { - this.name = name; - return this; - } - - public String getDescription() { - return description; - } - - public TaskDefinition setDescription(String description) { - this.description = description; - return this; - } - - public String getCommand() { - return command; - } - - public TaskDefinition setCommand(String command) { - this.command = command; - return this; - } - - public Class<? extends Task> getTask() { - return task; - } - - public TaskDefinition setTask(Class<? extends Task> task) { - this.task = task; - return this; - } - - @Override - public String toString() { - return "Definition of task " + task + " with command " + command; - } - -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskExtension.java b/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskExtension.java index 92c3c7230de..854f94e3824 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskExtension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskExtension.java @@ -19,12 +19,14 @@ */ package org.sonar.api.task; +import com.google.common.annotations.Beta; import org.sonar.api.Extension; /** - * Task extension point. + * EXPERIMENTAL - DO NOT USE * * @since 3.5 */ +@Beta public interface TaskExtension extends Extension, TaskComponent { } |