public class RulesProfile
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SONAR_WAY_FINDBUGS_NAME
Deprecated.
in 4.2. Use your own constant.
|
static java.lang.String |
SONAR_WAY_NAME
Deprecated.
in 4.2. Use your own constant.
|
static java.lang.String |
SUN_CONVENTIONS_NAME
Deprecated.
in 4.2. Use your own constant.
|
Constructor and Description |
---|
RulesProfile()
Deprecated.
use the factory method create()
|
RulesProfile(java.lang.String name,
java.lang.String language)
Deprecated.
since 2.3. Use the factory method create()
|
RulesProfile(java.lang.String name,
java.lang.String language,
boolean defaultProfile,
boolean provided)
Deprecated.
since 2.3. Use the factory method create()
|
Modifier and Type | Method and Description |
---|---|
ActiveRule |
activateRule(Rule rule,
RulePriority optionalSeverity) |
RulesProfile |
addActiveRule(ActiveRule activeRule) |
java.lang.Object |
clone() |
static RulesProfile |
create() |
static RulesProfile |
create(java.lang.String name,
java.lang.String language) |
boolean |
equals(java.lang.Object obj) |
ActiveRule |
getActiveRule(Rule rule)
Note: disabled rules are excluded.
|
ActiveRule |
getActiveRule(java.lang.String repositoryKey,
java.lang.String ruleKey)
Note: disabled rules are excluded.
|
ActiveRule |
getActiveRuleByConfigKey(java.lang.String repositoryKey,
java.lang.String configKey)
Note: disabled rules are excluded.
|
java.util.List<ActiveRule> |
getActiveRules() |
java.util.List<ActiveRule> |
getActiveRules(boolean acceptDisabledRules) |
java.util.List<ActiveRule> |
getActiveRules(RulePriority severity)
Note: disabled rules are excluded.
|
java.util.List<ActiveRule> |
getActiveRulesByRepository(java.lang.String repositoryKey)
Get the active rules of a specific repository.
|
java.lang.Boolean |
getDefaultProfile() |
java.lang.Integer |
getId() |
java.lang.String |
getLanguage() |
java.lang.String |
getName() |
java.lang.String |
getParentName()
Deprecated.
in 6.5
|
java.lang.Boolean |
getUsed()
Deprecated.
profile versioning is dropped in 4.4. Always returns null.
|
int |
getVersion()
Deprecated.
profile versioning is dropped in 4.4. Always returns -1.
|
int |
hashCode() |
RulesProfile |
removeActiveRule(ActiveRule activeRule) |
void |
setActiveRules(java.util.List<ActiveRule> activeRules)
Set the list of active rules
|
void |
setDefaultProfile(java.lang.Boolean b)
Set whether this is the default profile for the language.
|
RulesProfile |
setLanguage(java.lang.String s)
Set the profile language
|
RulesProfile |
setName(java.lang.String s)
Set the profile name.
|
void |
setParentName(java.lang.String parentName)
Deprecated.
in 6.5
|
RulesProfile |
setUsed(java.lang.Boolean used)
Deprecated.
profile versioning is dropped in 4.4. Always returns -1.
|
RulesProfile |
setVersion(int version)
Deprecated.
profile versioning is dropped in 4.4. Always returns -1.
|
java.lang.String |
toString() |
@Deprecated public static final java.lang.String SONAR_WAY_NAME
@Deprecated public static final java.lang.String SONAR_WAY_FINDBUGS_NAME
@Deprecated public static final java.lang.String SUN_CONVENTIONS_NAME
@Deprecated public RulesProfile()
@Deprecated public RulesProfile(java.lang.String name, java.lang.String language)
@Deprecated public RulesProfile(java.lang.String name, java.lang.String language, boolean defaultProfile, boolean provided)
public java.lang.Integer getId()
public java.lang.String getName()
public RulesProfile setName(java.lang.String s)
@Deprecated public int getVersion()
@Deprecated public RulesProfile setVersion(int version)
@CheckForNull @Deprecated public java.lang.Boolean getUsed()
@Deprecated public RulesProfile setUsed(java.lang.Boolean used)
public java.util.List<ActiveRule> getActiveRules()
public java.util.List<ActiveRule> getActiveRules(boolean acceptDisabledRules)
public RulesProfile removeActiveRule(ActiveRule activeRule)
public RulesProfile addActiveRule(ActiveRule activeRule)
public void setActiveRules(java.util.List<ActiveRule> activeRules)
public java.lang.Boolean getDefaultProfile()
public void setDefaultProfile(java.lang.Boolean b)
public java.lang.String getLanguage()
public RulesProfile setLanguage(java.lang.String s)
@Deprecated @CheckForNull public java.lang.String getParentName()
null
@Deprecated public void setParentName(java.lang.String parentName)
public java.util.List<ActiveRule> getActiveRules(RulePriority severity)
public java.util.List<ActiveRule> getActiveRulesByRepository(java.lang.String repositoryKey)
@CheckForNull public ActiveRule getActiveRule(java.lang.String repositoryKey, java.lang.String ruleKey)
@CheckForNull public ActiveRule getActiveRuleByConfigKey(java.lang.String repositoryKey, java.lang.String configKey)
@CheckForNull public ActiveRule getActiveRule(Rule rule)
public ActiveRule activateRule(Rule rule, @Nullable RulePriority optionalSeverity)
optionalSeverity
- if null, then the default rule severity is usedpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static RulesProfile create(java.lang.String name, java.lang.String language)
public static RulesProfile create()