diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-05-07 11:22:12 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-05-07 11:22:12 +0200 |
commit | 35aaa0091d1319da83dcfc558921ca7dd8689757 (patch) | |
tree | e03664abeb7c5b3b3480517bdd9b733ceb707c87 /sonar-plugin-api | |
parent | 9d6b148aea0128fbf5d92a9abdb56031b10de972 (diff) | |
download | sonarqube-35aaa0091d1319da83dcfc558921ca7dd8689757.tar.gz sonarqube-35aaa0091d1319da83dcfc558921ca7dd8689757.zip |
SONAR-3755 Add action plans to issue query and add WS to add action plan to issue
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java | 12 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/issue/IssueQueryTest.java | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java index 54fb244efa3..cf28674d90d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQuery.java @@ -47,6 +47,7 @@ public class IssueQuery { private final Collection<String> components; private final Collection<String> componentRoots; private final Collection<RuleKey> rules; + private final Collection<String> actionPlans; private final Collection<String> userLogins; private final Collection<String> assignees; private final Boolean assigned; @@ -70,6 +71,7 @@ public class IssueQuery { this.components = builder.components; this.componentRoots = builder.componentRoots; this.rules = builder.rules; + this.actionPlans = builder.actionPlans; this.userLogins = builder.userLogins; this.assignees = builder.assignees; this.assigned = builder.assigned; @@ -110,6 +112,10 @@ public class IssueQuery { return rules; } + public Collection<String> actionPlans() { + return actionPlans; + } + public Collection<String> userLogins() { return userLogins; } @@ -176,6 +182,7 @@ public class IssueQuery { private Collection<String> components; private Collection<String> componentRoots; private Collection<RuleKey> rules; + private Collection<String> actionPlans; private Collection<String> userLogins; private Collection<String> assignees; private Boolean assigned = null; @@ -225,6 +232,11 @@ public class IssueQuery { return this; } + public Builder actionPlans(Collection<String> l) { + this.actionPlans = l; + return this; + } + public Builder userLogins(Collection<String> l) { this.userLogins = l; return this; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/IssueQueryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/IssueQueryTest.java index c7646729b99..5b3a2d78823 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/IssueQueryTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/IssueQueryTest.java @@ -41,6 +41,7 @@ public class IssueQueryTest { .components(Lists.newArrayList("org/struts/Action.java")) .componentRoots(Lists.newArrayList("org.struts:core")) .rules(Lists.newArrayList(RuleKey.of("squid", "AvoidCycle"))) + .actionPlans(Lists.newArrayList("AP1", "AP2")) .userLogins(Lists.newArrayList("crunky")) .assignees(Lists.newArrayList("gargantua")) .assigned(true) @@ -60,6 +61,7 @@ public class IssueQueryTest { assertThat(query.assignees()).containsOnly("gargantua"); assertThat(query.assigned()).isTrue(); assertThat(query.rules()).containsOnly(RuleKey.of("squid", "AvoidCycle")); + assertThat(query.actionPlans()).containsOnly("AP1", "AP2"); assertThat(query.createdAfter()).isNotNull(); assertThat(query.createdBefore()).isNotNull(); assertThat(query.sort()).isEqualTo(IssueQuery.Sort.ASSIGNEE); |