From: Stephane Gamard Date: Mon, 28 Apr 2014 09:42:51 +0000 (+0200) Subject: Merge branch 'master' of https://github.com/SonarSource/sonarqube X-Git-Tag: 4.4-RC1~1381 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=940944f6b9ed7e387cf924b4ddda45f986593447;p=sonarqube.git Merge branch 'master' of https://github.com/SonarSource/sonarqube # By Julien Lancelot (6) and others # Via Julien Lancelot * 'master' of https://github.com/SonarSource/sonarqube: SONAR-4764 When removing profile at startup, do not check if the profile is deletable or not SONAR-4764 Fix issue on MySQL where profiles are empty because hibernate do not see new rules Complete WebService with new param metadata SONAR-4764 Remove icon near "Restore Default Profile" button SONAR-4764 Add a medium test SONAR-4764 Add Java WS Client to restore default profiles Rename addExtensions by addComponents SONAR-4927 Add Quality Gate widget SONAR-4927 Fix Build Breaker (remove alertLevel from new metric) Conflicts: sonar-server/src/main/java/org/sonar/server/rule2/RuleService.java --- 940944f6b9ed7e387cf924b4ddda45f986593447 diff --cc sonar-server/src/main/java/org/sonar/server/rule2/RuleService.java index 1260fe98638,f00af95d68e..a9087216fd8 --- a/sonar-server/src/main/java/org/sonar/server/rule2/RuleService.java +++ b/sonar-server/src/main/java/org/sonar/server/rule2/RuleService.java @@@ -1,29 -1,35 +1,59 @@@ + /* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 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.server.rule2; + import org.sonar.api.rule.RuleKey; +import org.sonar.server.search.Hit; + import javax.annotation.CheckForNull; + +import java.util.Collection; +import java.util.Collections; + + /** + * @since 4.4 + */ public class RuleService { + private RuleDao dao; + private RuleIndex index; + + public RuleService(RuleDao dao, RuleIndex index){ + this.dao = dao; + this.index = index; + } + + @CheckForNull + public Rule getByKey(RuleKey key) { + return null; + } ++ + public Collection search(RuleQuery query){ + return Collections.emptyList(); + } + + public static Rule toRule(RuleDto ruleDto){ + return new RuleImpl(); + } + + public static Rule toRule(Hit hit){ + return new RuleImpl(); + } }