|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.rules.RulesManager
public class RulesManager
A class to manage and access rules defined in Sonar
Constructor Summary | |
---|---|
protected |
RulesManager(DaoFacade dao)
Constructor for tests only |
|
RulesManager(Plugins plugins,
RulesRepository[] repositories,
DaoFacade dao)
Creates a RuleManager |
Method Summary | |
---|---|
Map<String,Long> |
countRulesByCategory(Language language)
Gets count of rules by categories defined for a given language |
protected Map<String,Long> |
countRulesByCategory(Language language,
RulesDao rulesDao)
|
List<Plugin> |
getExportablePlugins(Language language)
Get the list of rules plugin that implement a mechanism of export for a given language |
List<Plugin> |
getImportablePlugins(Language language)
Get the list of rules plugin that implement a mechanism of import for a given language |
Set<Language> |
getLanguages()
Returns the list of languages for which there is a rule repository |
Rule |
getPluginRule(String pluginKey,
String ruleKey)
Gets a rule belonging to a defined plugin based on its key |
Collection<Rule> |
getPluginRules(String pluginKey)
Gets a collection of rules belonging to a plugin |
Map<String,Rule> |
getPluginRulesIndexedByKey(String pluginKey)
Gets a list of rules indexed by their key for a given plugin |
List<Plugin> |
getPlugins(Language language)
Gets the list of rules plugins for a given language |
List<RulesRepository<?>> |
getRulesRepositories()
Gets the complete list of Rules Repositories in the Sonar instance |
List<RulesRepository<?>> |
getRulesRepositories(Language language)
Gets the list of Rules Repositories available for a language |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RulesManager(Plugins plugins, RulesRepository[] repositories, DaoFacade dao)
plugins
- the plugins dictionnaryrepositories
- the repositories of rulesdao
- the dao objectprotected RulesManager(DaoFacade dao)
dao
- the daoMethod Detail |
---|
public Set<Language> getLanguages()
public List<RulesRepository<?>> getRulesRepositories(Language language)
language
- the language
public List<RulesRepository<?>> getRulesRepositories()
public List<Plugin> getPlugins(Language language)
language
- the language
public Map<String,Long> countRulesByCategory(Language language)
language
- the language
protected Map<String,Long> countRulesByCategory(Language language, RulesDao rulesDao)
public List<Plugin> getExportablePlugins(Language language)
language
- the language
public List<Plugin> getImportablePlugins(Language language)
language
- the language
public Map<String,Rule> getPluginRulesIndexedByKey(String pluginKey)
pluginKey
- the plugin key
public Collection<Rule> getPluginRules(String pluginKey)
pluginKey
- the plugin key
public Rule getPluginRule(String pluginKey, String ruleKey)
pluginKey
- the plugin keyruleKey
- the rule key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |