Modifier and Type | Field and Description |
---|---|
static RulePriority |
DEFAULT_PRIORITY
The default priority given to a rule if not explicitly set
|
static String |
STATUS_BETA |
static String |
STATUS_DEPRECATED |
static String |
STATUS_READY |
static String |
STATUS_REMOVED
For internal use only.
|
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() |
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) |
org.sonar.check.Cardinality |
getCardinality()
Deprecated.
since 4.4, use
isTemplate() |
Integer |
getCharacteristicId()
Deprecated.
since 4.4, use
getCharacteristicKey() |
String |
getCharacteristicKey()
Deprecated.
in 5.5. SQALE Quality Model is replaced by SonarQube Quality Model.
|
String |
getConfigKey() |
Date |
getCreatedAt() |
Integer |
getDefaultCharacteristicId()
Deprecated.
since 4.4, use
getDefaultCharacteristicKey() |
String |
getDefaultCharacteristicKey()
Deprecated.
in 5.5. SQALE Quality Model is replaced by SonarQube Quality Model.
|
String |
getDefaultSubCharacteristicKey()
Deprecated.
in 5.5. SQALE Quality Model is replaced by SonarQube Quality Model.
|
String |
getDescription() |
Integer |
getId() |
String |
getKey() |
String |
getLanguage() |
String |
getName() |
RuleParam |
getParam(String key) |
List<RuleParam> |
getParams() |
Rule |
getParent()
Deprecated.
since 4.4, use
getTemplate() |
String |
getRepositoryKey() |
RulePriority |
getSeverity() |
String |
getStatus() |
String |
getSubCharacteristicKey()
Deprecated.
in 5.5. SQALE Quality Model is replaced by SonarQube Quality Model.
|
String[] |
getSystemTags()
For internal use
|
String[] |
getTags()
For definition of rule only
|
Rule |
getTemplate() |
Date |
getUpdatedAt() |
int |
hashCode() |
Boolean |
isEnabled() |
boolean |
isTemplate() |
RuleKey |
ruleKey() |
Rule |
setCardinality(org.sonar.check.Cardinality c)
Deprecated.
since 4.4, use
setIsTemplate(boolean) |
Rule |
setCharacteristicId(Integer characteristicId)
Deprecated.
since 4.4, use
setCharacteristicKey(String) |
Rule |
setCharacteristicKey(String characteristicKey)
Deprecated.
in 5.5. SQALE Quality Model is replaced by SonarQube Quality Model.
|
Rule |
setConfigKey(String configKey)
Sets the configuration key
|
Rule |
setCreatedAt(Date d) |
Rule |
setDefaultCharacteristicId(Integer defaultCharacteristicId)
Deprecated.
since 4.4, use
setDefaultCharacteristicKey(String) |
Rule |
setDefaultCharacteristicKey(String defaultCharacteristicKey)
Deprecated.
in 5.5. SQALE Quality Model is replaced by SonarQube Quality Model.
|
Rule |
setDefaultSubCharacteristicKey(String defaultSubCharacteristicKey)
Deprecated.
in 5.5. SQALE Quality Model is replaced by SonarQube Quality Model.
|
Rule |
setDescription(String description)
Sets the rule description
|
void |
setId(Integer id)
Deprecated.
since 2.3. visibility should be decreased to protected or package
|
Rule |
setIsTemplate(boolean isTemplate) |
Rule |
setKey(String key)
Sets the rule key
|
Rule |
setLanguage(String language)
For internal use only.
|
Rule |
setName(String name)
Sets the rule name
|
Rule |
setParams(List<RuleParam> params)
Sets the rule parameters
|
Rule |
setParent(Rule parent)
Deprecated.
since 4.4, use
setTemplate(Rule) } |
Rule |
setRepositoryKey(String s) |
Rule |
setSeverity(RulePriority severity) |
Rule |
setStatus(String status) |
Rule |
setSubCharacteristicKey(String subCharacteristicKey)
Deprecated.
in 5.5. SQALE Quality Model is replaced by SonarQube Quality Model.
|
Rule |
setTags(String[] tags)
For definition of rule only
|
Rule |
setTemplate(Rule template) |
Rule |
setUniqueKey(String repositoryKey,
String key) |
Rule |
setUpdatedAt(Date updatedAt) |
String |
toString() |
public static final String STATUS_BETA
public static final String STATUS_DEPRECATED
public static final String STATUS_READY
public static final String STATUS_REMOVED
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 void setId(Integer id)
public String getConfigKey()
public Rule setConfigKey(String configKey)
public String getDescription()
public Rule setDescription(String description)
public RuleParam createParameter()
public RuleParam createParameter(String key)
public RulePriority getSeverity()
public Rule setSeverity(RulePriority severity)
severity
- severity to set, if null, uses the default priority.public String getRepositoryKey()
public Rule setRepositoryKey(String s)
public Rule setUniqueKey(String repositoryKey, String key)
public boolean isTemplate()
public Rule setIsTemplate(boolean isTemplate)
@Deprecated public org.sonar.check.Cardinality getCardinality()
isTemplate()
@Deprecated public Rule setCardinality(org.sonar.check.Cardinality c)
setIsTemplate(boolean)
@Deprecated public Rule getParent()
getTemplate()
@Deprecated public Rule setParent(Rule parent)
setTemplate(Rule)
}public Rule getTemplate()
public Rule setTemplate(Rule template)
public Date getCreatedAt()
public Rule setCreatedAt(Date d)
public Date getUpdatedAt()
public Rule setUpdatedAt(Date updatedAt)
public String getLanguage()
public Rule setLanguage(String language)
public String[] getSystemTags()
@CheckForNull @Deprecated public Integer getCharacteristicId()
getCharacteristicKey()
@Deprecated public Rule setCharacteristicId(@Nullable Integer characteristicId)
setCharacteristicKey(String)
@CheckForNull @Deprecated public Integer getDefaultCharacteristicId()
getDefaultCharacteristicKey()
@Deprecated public Rule setDefaultCharacteristicId(@Nullable Integer defaultCharacteristicId)
setDefaultCharacteristicKey(String)
public static Rule create(String repositoryKey, String key, String name)
public static Rule create(String repositoryKey, String key)
@CheckForNull @Deprecated public String getDefaultCharacteristicKey()
@Deprecated public Rule setDefaultCharacteristicKey(@Nullable String defaultCharacteristicKey)
@CheckForNull @Deprecated public String getDefaultSubCharacteristicKey()
@Deprecated public Rule setDefaultSubCharacteristicKey(@Nullable String defaultSubCharacteristicKey)
@CheckForNull @Deprecated public String getCharacteristicKey()
@Deprecated public Rule setCharacteristicKey(@Nullable String characteristicKey)
@CheckForNull @Deprecated public String getSubCharacteristicKey()
@Deprecated public Rule setSubCharacteristicKey(@Nullable String subCharacteristicKey)
Copyright © 2009–2016 SonarSource. All rights reserved.