summaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-10-05 16:25:01 +0200
committerDavid Gageot <david@gageot.net>2012-10-05 16:25:01 +0200
commitd6ca1d42ff5ad857ac04b4479732bd91d84e5076 (patch)
treec451a891f6a354896acfcc3da61013155e29676c /sonar-plugin-api
parent43e916612a3ce005ccbb4406368f883e0deb9184 (diff)
downloadsonarqube-d6ca1d42ff5ad857ac04b4479732bd91d84e5076.tar.gz
sonarqube-d6ca1d42ff5ad857ac04b4479732bd91d84e5076.zip
SONAR-3819 Use the "options" parameter on @WidgetProperty to filter metrics
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java
index 4fd661a7dfb..90fe3ea39fe 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java
@@ -37,4 +37,18 @@ public @interface WidgetProperty {
String description() default "";
boolean optional() default true;
+
+ /**
+ * Options for property of type WidgetPropertyType.METRIC</code>.
+ *
+ * If no option is specified, any metric will match.
+ * If options are specified, all must match for the metric to be displayed.
+ * Three types of filter are supported <code>key:REGEXP</code>, <code>domain:REGEXP</code> and <code>type:comma_separated__list_of_types</code>.
+ * For example <code>key:new_.*</code> will match any metric which key starts by <code>new_</code>.
+ * For example <code>type:INT,FLOAT</code> will match any metric of type <code>INT</code> or <code>FLOAT</code>.
+ * For example <code>type:NUMERIC</code> will match any metric of numerictype.
+ *
+ * @since 3.3
+ */
+ String[] options() default {};
}