Modifier and Type | Field and Description |
---|---|
static RulePriority |
DEFAULT_PRIORITY
The default priority given to a rule if not explicitly set
|
Constructor and Description |
---|
Rule()
Deprecated.
since 2.3. Use the factory method
create() |
Rule(String pluginName,
String key)
Deprecated.
since 2.3. Use the factory method
create() |
Rule(String name,
String key,
RulesCategory rulesCategory,
String pluginName,
String description)
Deprecated.
since 2.3. Use the factory method
create() |
Rule(String pluginKey,
String key,
String name,
RulesCategory rulesCategory,
RulePriority severity)
Deprecated.
since 2.3. Use the factory method
create() |
Rule(String name,
String key,
String configKey,
RulesCategory rulesCategory,
String pluginName,
String description)
Deprecated.
since 2.3. Use the factory method
create() |
Modifier and Type | Method and Description |
---|---|
static Rule |
create() |
static Rule |
create(String repositoryKey,
String key)
Create with all required fields
|
static Rule |
create(String repositoryKey,
String key,
String name)
Create with all required fields
|
RuleParam |
createParameter() |
RuleParam |
createParameter(String key) |
boolean |
equals(Object obj) |
Cardinality |
getCardinality() |
Integer |
getCategoryId()
Deprecated.
since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
|
String |
getConfigKey() |
String |
getDescription() |
Integer |
getId() |
String |
getKey() |
String |
getName() |
RuleParam |
getParam(String key) |
List<RuleParam> |
getParams() |
Rule |
getParent() |
String |
getPluginName()
Deprecated.
since 2.5 use
getRepositoryKey() instead |
RulePriority |
getPriority()
Deprecated.
since 2.5 use
getSeverity() instead. See http://jira.codehaus.org/browse/SONAR-1829 |
String |
getRepositoryKey() |
RulePriority |
getSeverity() |
int |
hashCode() |
Boolean |
isEnabled() |
Rule |
setCardinality(Cardinality c) |
Rule |
setConfigKey(String configKey)
Sets the configuration key
|
Rule |
setDescription(String description)
Sets the rule description
|
Rule |
setEnabled(Boolean b)
Do not call.
|
void |
setId(Integer id)
Deprecated.
since 2.3. visibility should be decreased to protected or package
|
Rule |
setKey(String key)
Sets the rule key
|
Rule |
setName(String name)
Sets the rule name
|
Rule |
setParams(List<RuleParam> params)
Sets the rule parameters
|
Rule |
setParent(Rule parent) |
Rule |
setPluginName(String pluginName)
Deprecated.
since 2.5 use
setRepositoryKey(String) instead |
Rule |
setPriority(RulePriority priority)
Deprecated.
since 2.5 use
setSeverity(RulePriority) instead. See http://jira.codehaus.org/browse/SONAR-1829 |
Rule |
setRepositoryKey(String s) |
Rule |
setSeverity(RulePriority severity) |
Rule |
setUniqueKey(String repositoryKey,
String key) |
String |
toString() |
public static final RulePriority DEFAULT_PRIORITY
@Deprecated public Rule()
create()
@Deprecated public Rule(String pluginName, String key)
create()
pluginName
- the plugin name indicates which plugin the rule belongs tokey
- the key should be unique within a plugin, but it is even more careful for the time being that it is unique across the
application@Deprecated public Rule(String pluginKey, String key, String name, RulesCategory rulesCategory, RulePriority severity)
create()
pluginKey
- the plugin the rule belongs tokey
- the key should be unique within a plugin, but it is even more careful for the time being that it is unique across the
applicationname
- the name displayed in the UIrulesCategory
- the ISO category the rule belongs toseverity
- this is the severity associated to the rule@Deprecated public Rule(String name, String key, RulesCategory rulesCategory, String pluginName, String description)
create()
@Deprecated public Rule(String name, String key, String configKey, RulesCategory rulesCategory, String pluginName, String description)
create()
@Deprecated public void setId(Integer id)
@Deprecated public String getPluginName()
getRepositoryKey()
instead@Deprecated public Rule setPluginName(String pluginName)
setRepositoryKey(String)
insteadpublic String getConfigKey()
public Rule setConfigKey(String configKey)
public String getDescription()
public Rule setDescription(String description)
public Rule setEnabled(Boolean b)
public RuleParam createParameter()
public RuleParam createParameter(String key)
@Deprecated public Integer getCategoryId()
public RulePriority getSeverity()
public Rule setSeverity(RulePriority severity)
severity
- severity to set, if null, uses the default priority.@Deprecated public RulePriority getPriority()
getSeverity()
instead. See http://jira.codehaus.org/browse/SONAR-1829@Deprecated public Rule setPriority(RulePriority priority)
setSeverity(RulePriority)
instead. See http://jira.codehaus.org/browse/SONAR-1829public String getRepositoryKey()
public Rule setRepositoryKey(String s)
public Rule setUniqueKey(String repositoryKey, String key)
public Cardinality getCardinality()
public Rule setCardinality(Cardinality c)
public static Rule create(String repositoryKey, String key, String name)
Copyright © 2009-2013 SonarSource. All Rights Reserved.