diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2017-01-12 08:35:07 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2017-01-13 17:58:12 +0100 |
commit | 4639e5c59ccc77214ae9508d918711861a226af5 (patch) | |
tree | 641eb7b5ddd3b0843bed1e726b0db3f37b869e37 /sonar-plugin-api/src | |
parent | f0e22159e7792c0a864f7a395de065e006f553f1 (diff) | |
download | sonarqube-4639e5c59ccc77214ae9508d918711861a226af5.tar.gz sonarqube-4639e5c59ccc77214ae9508d918711861a226af5.zip |
SONAR-8582 Deprecate old Page API and related classes
Diffstat (limited to 'sonar-plugin-api/src')
12 files changed, 42 insertions, 41 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractRubyTemplate.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractRubyTemplate.java index 730db7c6242..9c920bd436b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractRubyTemplate.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractRubyTemplate.java @@ -17,34 +17,22 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.api.web; -import org.apache.commons.io.FileUtils; -import org.apache.commons.io.IOUtils; -import org.sonar.api.utils.SonarException; +package org.sonar.api.web; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.sonar.api.utils.SonarException; /** - * It's useful in development environment to see browser rendering in real time while editing the template. To do that, just - * return an absolute path in the method getTemplatePath() :<br> - * <pre> - * <code> - * protected String getTemplatePath() { - * return "/tmp/sample_dashboard_widget.erb"; - * } - * </code> - * </pre> - * Build and deploy the plugin in /extensions/plugins. The file /tmp/sample_dashboard_widget.erb will be reloaded on each request. - * <br> - * <br> - * In production environment, you have to return the classloader path, for example "/org/sonar/myplugin/sample_dashboard_widget.erb". - * * @since 1.11 + * @deprecated since 6.3. This class is ignored. */ +@Deprecated public abstract class AbstractRubyTemplate { private String cache = null; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/CodeColorizerFormat.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/CodeColorizerFormat.java index 187777e7cf7..b206ef32ee0 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/CodeColorizerFormat.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/CodeColorizerFormat.java @@ -17,19 +17,20 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.sonar.api.web; import com.google.common.base.MoreObjects; +import java.util.List; +import org.sonar.api.batch.sensor.SensorContext; import org.sonar.api.task.TaskExtension; import org.sonar.colorizer.Tokenizer; -import java.util.List; - /** * Extend the library sonar-colorizer to support new languages. * * @since 1.12 - * @deprecated since 4.5.2 use {@link org.sonar.api.source.Highlightable} + * @deprecated since 4.5.2 use {@link SensorContext#newHighlighting()} */ @Deprecated public abstract class CodeColorizerFormat implements TaskExtension { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/DefaultTab.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/DefaultTab.java index 01ebc987bd0..8aa954384a9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/DefaultTab.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/DefaultTab.java @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.sonar.api.web; import java.lang.annotation.ElementType; @@ -26,9 +27,11 @@ import java.lang.annotation.Target; /** * @since 2.0 + * @deprecated since 6.3 see {@link org.sonar.api.web.page.PageDefinition}. This class is ignored. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Deprecated public @interface DefaultTab { // default value is all metrics diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/Description.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/Description.java index 10a7e642c89..35839a0ca7b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/Description.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/Description.java @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.sonar.api.web; import java.lang.annotation.ElementType; @@ -24,8 +25,12 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * @deprecated since 6.3 see {@link org.sonar.api.web.page.PageDefinition}. This class is ignored. + */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Deprecated public @interface Description { String value(); } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/NavigationSection.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/NavigationSection.java index 49152f82568..51c104cebd1 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/NavigationSection.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/NavigationSection.java @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.sonar.api.web; import java.lang.annotation.ElementType; @@ -28,9 +29,11 @@ import java.lang.annotation.Target; * The Page is displayed only in listed sections. This annotation is ignored on Widgets. * * @since 1.11 + * @deprecated since 6.3 see {@link org.sonar.api.web.page.PageDefinition}. This class is ignored. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Deprecated public @interface NavigationSection { String HOME = "home"; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/Page.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/Page.java index 19c5a95bdf3..0134e2da139 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/Page.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/Page.java @@ -17,11 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.sonar.api.web; /** * @since 2.0 + * @deprecated since 6.3 see {@link org.sonar.api.web.page.PageDefinition}. This class is ignored. */ +@Deprecated public interface Page extends View { } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/PageDecoration.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/PageDecoration.java index 963759254db..35b7de0db28 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/PageDecoration.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/PageDecoration.java @@ -17,36 +17,19 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.sonar.api.web; import org.sonar.api.ExtensionPoint; import org.sonar.api.server.ServerSide; /** - * Adds content to HTML pages. A PageDecoration is a Rails template (html.erb file) that executes content_for blocks on predefined locations : - * <ul> - * <li><code>script</code> : javascript header</li> - * <li><code>style</code> : CSS header</li> - * <li><code>header</code> : area over the black top navigation bar</li> - * <li><code>footer</code> : area below the main page</li> - * <li><code>sidebar</code> : area in the sidebar between the menu and the sonar logo</li> - * </ul> - * - * <p>Example of template: -<pre> - <% content_for :script do %> - <script>alert('page loaded')</script> - <% end %> - - <% content_for :footer do %> - <div>this is <b>my footer</b></div> -<% end %> -</pre> - * * @since 3.3 + * @deprecated since 6.3 see {@link org.sonar.api.web.page.PageDefinition}. This class is ignored. */ @ServerSide @ExtensionPoint +@Deprecated public abstract class PageDecoration extends AbstractRubyTemplate { } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceLanguage.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceLanguage.java index 3fcc48fb873..58a60f8aca4 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceLanguage.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceLanguage.java @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.sonar.api.web; import java.lang.annotation.ElementType; @@ -28,9 +29,11 @@ import java.lang.annotation.Target; * The view is displayed only if the selected resource has the same language. * * @since 1.11 + * @deprecated since 6.3 see {@link org.sonar.api.web.page.PageDefinition}. This class is ignored. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Deprecated public @interface ResourceLanguage { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceQualifier.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceQualifier.java index 4be29dec256..87f2dd45df5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceQualifier.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceQualifier.java @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.sonar.api.web; import java.lang.annotation.ElementType; @@ -28,9 +29,11 @@ import java.lang.annotation.Target; * The view is displayed only if the selected resource has the same qualifier. * * @since 1.11 + * @deprecated since 6.3 see {@link org.sonar.api.web.page.PageDefinition}. This class is ignored. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Deprecated public @interface ResourceQualifier { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceScope.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceScope.java index c800c152111..b579e13c822 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceScope.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceScope.java @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.sonar.api.web; import java.lang.annotation.ElementType; @@ -29,9 +30,11 @@ import java.lang.annotation.Target; * The view is displayed only if the selected resource has the same qualifier. * * @since 1.11 + * @deprecated since 6.3 see {@link org.sonar.api.web.page.PageDefinition}. This class is ignored. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) +@Deprecated public @interface ResourceScope { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsPage.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsPage.java index a17a1d3d56b..198bff6787b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsPage.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsPage.java @@ -17,11 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.sonar.api.web; /** * @since 1.11 + * @deprecated since 6.3 see {@link org.sonar.api.web.page.PageDefinition}. This class is ignored. */ +@Deprecated public interface RubyRailsPage extends Page { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/View.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/View.java index 941185db364..65a070fc6a3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/web/View.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/View.java @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.sonar.api.web; import org.sonar.api.ExtensionPoint; @@ -24,9 +25,11 @@ import org.sonar.api.server.ServerSide; /** * @since 1.11 + * @deprecated since 6.3 see {@link org.sonar.api.web.page.PageDefinition}. This class is ignored. */ @ServerSide @ExtensionPoint +@Deprecated public interface View { String getId(); |