|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.rules.Rule
public class Rule
Field Summary | |
---|---|
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 Summary | |
---|---|
Rule()
Deprecated. since 2.3. Use the factory method create() |
|
Rule(String pluginName,
String key)
Deprecated. since 2.3. Use the factory method create() |
Method Summary | |
---|---|
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()
Deprecated. since 4.4, use isTemplate() |
Integer |
getCategoryId()
Deprecated. since 2.5. See http://jira.codehaus.org/browse/SONAR-2007 |
Integer |
getCharacteristicId()
Deprecated. since 4.4, use getCharacteristicKey() |
String |
getCharacteristicKey()
|
String |
getConfigKey()
|
Date |
getCreatedAt()
|
Integer |
getDefaultCharacteristicId()
Deprecated. since 4.4, use getDefaultCharacteristicKey() |
String |
getDefaultCharacteristicKey()
|
String |
getDefaultSubCharacteristicKey()
|
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 |
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()
|
String |
getStatus()
|
String |
getSubCharacteristicKey()
|
String[] |
getTags()
For definition of rule only |
Rule |
getTemplate()
|
Date |
getUpdatedAt()
|
int |
hashCode()
|
Boolean |
isEnabled()
|
boolean |
isTemplate()
|
RuleKey |
ruleKey()
|
Rule |
setCardinality(Cardinality c)
Deprecated. since 4.4, use setIsTemplate(boolean) |
Rule |
setCharacteristicId(Integer characteristicId)
Deprecated. since 4.4, use #setCharacteristicKey(@Nullable String characteristicKey) |
Rule |
setCharacteristicKey(String characteristicKey)
|
Rule |
setConfigKey(String configKey)
Sets the configuration key |
Rule |
setCreatedAt(Date d)
|
Rule |
setDefaultCharacteristicId(Integer defaultCharacteristicId)
Deprecated. since 4.4, use #setDefaultCharacteristicKey(@Nullable String defaultCharacteristicKey) |
Rule |
setDefaultCharacteristicKey(String defaultCharacteristicKey)
|
Rule |
setDefaultSubCharacteristicKey(String defaultSubCharacteristicKey)
|
Rule |
setDescription(String description)
Sets the rule description |
Rule |
setEnabled(Boolean enabled)
Deprecated. in 3.6. Replaced by setStatus(String status) . |
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 |
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 |
setStatus(String status)
|
Rule |
setSubCharacteristicKey(String subCharacteristicKey)
|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
@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
applicationMethod Detail |
---|
public Integer getId()
@Deprecated public void setId(Integer id)
public String getName()
public Rule setName(String name)
public String getKey()
public Rule setKey(String key)
@Deprecated public String getPluginName()
getRepositoryKey()
instead
@Deprecated public Rule setPluginName(String pluginName)
setRepositoryKey(String)
instead
public String getConfigKey()
public Rule setConfigKey(String configKey)
public String getDescription()
public Rule setDescription(String description)
@Deprecated public Rule setEnabled(Boolean enabled)
setStatus(String status)
.
public Boolean isEnabled()
public List<RuleParam> getParams()
public RuleParam getParam(String key)
public Rule setParams(List<RuleParam> params)
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-1829
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 Cardinality getCardinality()
isTemplate()
@Deprecated public Rule setCardinality(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 String getStatus()
public Rule setStatus(String status)
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[] getTags()
public Rule setTags(String[] tags)
@CheckForNull @Deprecated public Integer getCharacteristicId()
getCharacteristicKey()
@Deprecated public Rule setCharacteristicId(@Nullable Integer characteristicId)
#setCharacteristicKey(@Nullable String characteristicKey)
@CheckForNull @Deprecated public Integer getDefaultCharacteristicId()
getDefaultCharacteristicKey()
@Deprecated public Rule setDefaultCharacteristicId(@Nullable Integer defaultCharacteristicId)
#setDefaultCharacteristicKey(@Nullable String defaultCharacteristicKey)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public static Rule create()
public static Rule create(String repositoryKey, String key, String name)
public static Rule create(String repositoryKey, String key)
public RuleKey ruleKey()
@CheckForNull public String getDefaultCharacteristicKey()
public Rule setDefaultCharacteristicKey(@Nullable String defaultCharacteristicKey)
@CheckForNull public String getDefaultSubCharacteristicKey()
public Rule setDefaultSubCharacteristicKey(@Nullable String defaultSubCharacteristicKey)
@CheckForNull public String getCharacteristicKey()
public Rule setCharacteristicKey(@Nullable String characteristicKey)
@CheckForNull public String getSubCharacteristicKey()
public Rule setSubCharacteristicKey(@Nullable String subCharacteristicKey)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |