|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sonar.api.rules.Rule
public final class Rule
Nested Class Summary | |
---|---|
static class |
Rule.Cardinality
|
Field Summary | |
---|---|
static RulePriority |
DEFAULT_PRIORITY
The default priority given to a rule if not explicitely set |
Constructor Summary | |
---|---|
Rule()
Deprecated. since 2.3. Use the factory method create() |
|
Rule(java.lang.String pluginName,
java.lang.String key)
Deprecated. since 2.3. Use the factory method create() |
|
Rule(java.lang.String name,
java.lang.String key,
RulesCategory rulesCategory,
java.lang.String pluginName,
java.lang.String description)
Deprecated. Use the factory method create() |
|
Rule(java.lang.String pluginKey,
java.lang.String key,
java.lang.String name,
RulesCategory rulesCategory,
RulePriority priority)
Deprecated. since 2.3. Use the factory method create() |
|
Rule(java.lang.String name,
java.lang.String key,
java.lang.String configKey,
RulesCategory rulesCategory,
java.lang.String pluginName,
java.lang.String description)
Deprecated. since 2.3. Use the factory method create() |
Method Summary | |
---|---|
static Rule |
create()
|
static Rule |
create(java.lang.String repositoryKey,
java.lang.String key,
java.lang.String name)
Create with all required fields |
RuleParam |
createParameter()
|
RuleParam |
createParameter(java.lang.String key)
|
boolean |
equals(java.lang.Object obj)
|
Rule.Cardinality |
getCardinality()
|
java.lang.Integer |
getCategoryId()
|
java.lang.String |
getConfigKey()
|
java.lang.String |
getDescription()
|
java.lang.Integer |
getId()
|
java.lang.String |
getKey()
|
java.lang.String |
getName()
|
RuleParam |
getParam(java.lang.String key)
|
java.util.List<RuleParam> |
getParams()
|
Rule |
getParent()
|
java.lang.String |
getPluginName()
|
RulePriority |
getPriority()
|
java.lang.String |
getRepositoryKey()
|
RulesCategory |
getRulesCategory()
|
int |
hashCode()
|
java.lang.Boolean |
isEnabled()
|
Rule |
setCardinality(Rule.Cardinality c)
|
Rule |
setConfigKey(java.lang.String configKey)
Sets the configuration key |
Rule |
setDescription(java.lang.String description)
Sets the rule description |
Rule |
setEnabled(java.lang.Boolean b)
Do not call. |
void |
setId(java.lang.Integer id)
Deprecated. visibility should be decreased to protected or package |
Rule |
setKey(java.lang.String key)
Sets the rule key |
Rule |
setName(java.lang.String name)
Sets the rule name |
Rule |
setParams(java.util.List<RuleParam> params)
Sets the rule parameters |
Rule |
setParent(Rule parent)
|
Rule |
setPluginName(java.lang.String pluginName)
Sets the plugin name the rule belongs to |
Rule |
setPriority(RulePriority priority)
Sets the rule priority. |
Rule |
setRepositoryKey(java.lang.String s)
|
Rule |
setRulesCategory(RulesCategory rulesCategory)
Sets the rule category |
Rule |
setUniqueKey(java.lang.String repositoryKey,
java.lang.String key)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final RulePriority DEFAULT_PRIORITY
Constructor Detail |
---|
@Deprecated public Rule()
@Deprecated public Rule(java.lang.String pluginName, java.lang.String key)
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(java.lang.String pluginKey, java.lang.String key, java.lang.String name, RulesCategory rulesCategory, RulePriority priority)
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 topriority
- this is the priority associated to the rule@Deprecated public Rule(java.lang.String name, java.lang.String key, RulesCategory rulesCategory, java.lang.String pluginName, java.lang.String description)
@Deprecated public Rule(java.lang.String name, java.lang.String key, java.lang.String configKey, RulesCategory rulesCategory, java.lang.String pluginName, java.lang.String description)
Method Detail |
---|
public java.lang.Integer getId()
@Deprecated public void setId(java.lang.Integer id)
public java.lang.String getName()
public Rule setName(java.lang.String name)
public java.lang.String getKey()
public Rule setKey(java.lang.String key)
public RulesCategory getRulesCategory()
public Rule setRulesCategory(RulesCategory rulesCategory)
public java.lang.String getPluginName()
public Rule setPluginName(java.lang.String pluginName)
public java.lang.String getConfigKey()
public Rule setConfigKey(java.lang.String configKey)
public java.lang.String getDescription()
public java.lang.Boolean isEnabled()
public Rule setEnabled(java.lang.Boolean b)
public Rule setDescription(java.lang.String description)
public java.util.List<RuleParam> getParams()
public RuleParam getParam(java.lang.String key)
public Rule setParams(java.util.List<RuleParam> params)
public RuleParam createParameter()
public RuleParam createParameter(java.lang.String key)
public java.lang.Integer getCategoryId()
public RulePriority getPriority()
public Rule setPriority(RulePriority priority)
public java.lang.String getRepositoryKey()
public Rule setRepositoryKey(java.lang.String s)
public Rule setUniqueKey(java.lang.String repositoryKey, java.lang.String key)
public Rule.Cardinality getCardinality()
public Rule setCardinality(Rule.Cardinality c)
public Rule getParent()
public Rule setParent(Rule parent)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static Rule create()
public static Rule create(java.lang.String repositoryKey, java.lang.String key, java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |