diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-04-27 18:20:24 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-04-27 18:23:53 +0200 |
commit | bd8e6bb58334bc065749fbffb5362eba936b023d (patch) | |
tree | 2b5035daa7ab0e46bcb3f27f32a9770b13b715b6 /sonar-plugin-api | |
parent | f293e4b9558877a35a893ea8f0f4dcc037645396 (diff) | |
download | sonarqube-bd8e6bb58334bc065749fbffb5362eba936b023d.tar.gz sonarqube-bd8e6bb58334bc065749fbffb5362eba936b023d.zip |
Improve interactions between JRuby and Java components
Diffstat (limited to 'sonar-plugin-api')
3 files changed, 7 insertions, 51 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueFinder.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueFinder.java index d82d43c0011..70086f1b245 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueFinder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueFinder.java @@ -24,6 +24,7 @@ import org.sonar.api.ServerComponent; import org.sonar.api.component.Component; import org.sonar.api.rules.Rule; +import javax.annotation.CheckForNull; import javax.annotation.Nullable; import java.util.Collection; @@ -55,6 +56,7 @@ public interface IssueFinder extends ServerComponent { Results find(IssueQuery query, @Nullable Integer currentUserId, String role); + @CheckForNull Issue findByKey(String key /* TODO @Nullable Integer currentUserId */); /* diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/JRubyIssues.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/JRubyIssues.java index f366e433ee2..a56d44340e4 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/JRubyIssues.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/JRubyIssues.java @@ -35,16 +35,13 @@ public interface JRubyIssues extends ServerComponent { /** * Search for issues. - * - * <p> - * Ruby: <code>Api.issues.find(hash_of_parameters, current_user.id)</code> - * </p> - * - * <p>Parameters</p> + * <p/> + * Ruby: <code>Api.issues.find(hash_of_parameters)</code> + * <p/> * <ul> - * TODO document parameters + * TODO document parameters * </ul> */ - IssueFinder.Results find(Map<String, Object> parameters, Integer currentUserId); + IssueFinder.Results find(Map<String, Object> parameters); } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rule/JRubyRules.java b/sonar-plugin-api/src/main/java/org/sonar/api/rule/JRubyRules.java deleted file mode 100644 index 87656e61133..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rule/JRubyRules.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2013 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube 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. - * - * SonarQube 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 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.rule; - -import org.sonar.api.ServerComponent; - -/** - * Facade for JRuby on Rails extensions to request rules. - * <p> - * Reference from Ruby code : <code>Api.rules</code> - * </p> - * - * @since 3.6 - */ -public interface JRubyRules extends ServerComponent { - - /** - * Return the localized name of a rule. - * - * <p> - * Ruby: <code>Api.rules.ruleName(I18n.locale, rule.rule_key)</code> - * </p> - */ - String ruleName(String rubyLocale, RuleKey ruleKey); - -} |