org.sonar.commons.rules
Class RulesDao

java.lang.Object
  extended by org.sonar.commons.rules.RulesDao

public class RulesDao
extends java.lang.Object


Constructor Summary
RulesDao(DatabaseManager manager)
           
 
Method Summary
 void addActiveRulesToProfile(java.util.List<ch.hortis.sonar.model.ActiveRule> activeRules, int profileId, java.lang.String pluginKey)
           
 java.lang.Long countRules(java.util.List<java.lang.String> plugins, java.lang.String categoryName)
           
 void deleteActiveRuleParameters(RuleParam ruleParam)
           
 ch.hortis.sonar.model.RulesProfile getActiveProfile(java.lang.String languageKey)
           
 java.util.List<ch.hortis.sonar.model.RulesProfile> getActiveProfiles()
           
 java.util.List<ch.hortis.sonar.model.RulesCategory> getCategories()
           
 ch.hortis.sonar.model.RulesCategory getCategory(java.lang.String key)
           
 ch.hortis.sonar.model.RulesProfile getProfile(java.lang.String languageKey, java.lang.String profileName)
           
 ch.hortis.sonar.model.RulesProfile getProfileById(int profileId)
           
 java.util.List<ch.hortis.sonar.model.RulesProfile> getProfiles(java.lang.String languageKey)
           
 java.util.List<ch.hortis.sonar.model.RulesProfile> getProvidedProfiles()
           
 ch.hortis.sonar.model.Rule getRule(java.lang.String pluginKey, java.lang.String ruleKey)
           
 ch.hortis.sonar.model.Rule getRuleByKey(java.lang.String pluginKey, java.lang.String ruleKey)
           
 java.util.List<ch.hortis.sonar.model.RuleFailure> getRuleFailures(ch.hortis.sonar.model.Snapshot snapshot)
           
 java.util.List<RuleParam> getRuleParams()
           
 java.util.List<ch.hortis.sonar.model.Rule> getRules()
           
 java.util.List<ch.hortis.sonar.model.Rule> getRulesByCategory(ch.hortis.sonar.model.RulesCategory categ)
           
 java.util.List<ch.hortis.sonar.model.Rule> getRulesByPlugin(java.lang.String pluginKey)
           
 boolean isRuleParamEqual(RuleParam ruleParam, RuleParam ruleParamFromDatabase, java.lang.String ruleKey, java.lang.String pluginKey)
           
 void synchronizeRuleOfActiveRule(ch.hortis.sonar.model.ActiveRule activeRule, java.lang.String pluginKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RulesDao

public RulesDao(DatabaseManager manager)
Method Detail

addActiveRulesToProfile

public void addActiveRulesToProfile(java.util.List<ch.hortis.sonar.model.ActiveRule> activeRules,
                                    int profileId,
                                    java.lang.String pluginKey)

countRules

public java.lang.Long countRules(java.util.List<java.lang.String> plugins,
                                 java.lang.String categoryName)

deleteActiveRuleParameters

public void deleteActiveRuleParameters(RuleParam ruleParam)

getActiveProfile

public ch.hortis.sonar.model.RulesProfile getActiveProfile(java.lang.String languageKey)

getActiveProfiles

public java.util.List<ch.hortis.sonar.model.RulesProfile> getActiveProfiles()

getCategories

public java.util.List<ch.hortis.sonar.model.RulesCategory> getCategories()

getCategory

public ch.hortis.sonar.model.RulesCategory getCategory(java.lang.String key)

getProfile

public ch.hortis.sonar.model.RulesProfile getProfile(java.lang.String languageKey,
                                                     java.lang.String profileName)

getProfileById

public ch.hortis.sonar.model.RulesProfile getProfileById(int profileId)

getProfiles

public java.util.List<ch.hortis.sonar.model.RulesProfile> getProfiles(java.lang.String languageKey)

getProvidedProfiles

public java.util.List<ch.hortis.sonar.model.RulesProfile> getProvidedProfiles()

getRule

public ch.hortis.sonar.model.Rule getRule(java.lang.String pluginKey,
                                          java.lang.String ruleKey)

getRuleByKey

public ch.hortis.sonar.model.Rule getRuleByKey(java.lang.String pluginKey,
                                               java.lang.String ruleKey)

getRuleFailures

public java.util.List<ch.hortis.sonar.model.RuleFailure> getRuleFailures(ch.hortis.sonar.model.Snapshot snapshot)

getRuleParams

public java.util.List<RuleParam> getRuleParams()

getRules

public java.util.List<ch.hortis.sonar.model.Rule> getRules()

getRulesByCategory

public java.util.List<ch.hortis.sonar.model.Rule> getRulesByCategory(ch.hortis.sonar.model.RulesCategory categ)

getRulesByPlugin

public java.util.List<ch.hortis.sonar.model.Rule> getRulesByPlugin(java.lang.String pluginKey)

isRuleParamEqual

public boolean isRuleParamEqual(RuleParam ruleParam,
                                RuleParam ruleParamFromDatabase,
                                java.lang.String ruleKey,
                                java.lang.String pluginKey)

synchronizeRuleOfActiveRule

public void synchronizeRuleOfActiveRule(ch.hortis.sonar.model.ActiveRule activeRule,
                                        java.lang.String pluginKey)


Copyright © 2008-2009 SonarSource SA. All Rights Reserved.