public class RulesProfile extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
static String |
SONAR_WAY_FINDBUGS_NAME
Deprecated.
in 4.2. Use your own constant.
|
static String |
SONAR_WAY_NAME
Deprecated.
in 4.2. Use your own constant.
|
static String |
SUN_CONVENTIONS_NAME
Deprecated.
in 4.2. Use your own constant.
|
Constructor and Description |
---|
RulesProfile()
Deprecated.
use the factory method create()
|
RulesProfile(String name,
String language)
Deprecated.
since 2.3. Use the factory method create()
|
RulesProfile(String name,
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) |
Object |
clone() |
static RulesProfile |
create() |
static RulesProfile |
create(String name,
String language) |
boolean |
equals(Object obj) |
ActiveRule |
getActiveRule(Rule rule)
Note: disabled rules are excluded.
|
ActiveRule |
getActiveRule(String repositoryKey,
String ruleKey)
Note: disabled rules are excluded.
|
ActiveRule |
getActiveRuleByConfigKey(String repositoryKey,
String configKey)
Note: disabled rules are excluded.
|
List<ActiveRule> |
getActiveRules() |
List<ActiveRule> |
getActiveRules(boolean acceptDisabledRules) |
List<ActiveRule> |
getActiveRules(RulePriority severity)
Note: disabled rules are excluded.
|
List<ActiveRule> |
getActiveRulesByRepository(String repositoryKey)
Get the active rules of a specific repository.
|
Boolean |
getDefaultProfile() |
Integer |
getId() |
String |
getLanguage() |
String |
getName() |
String |
getParentName()
For internal use only.
|
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(List<ActiveRule> activeRules)
Set the list of active rules
|
void |
setDefaultProfile(Boolean b)
Set whether this is the default profile for the language.
|
RulesProfile |
setLanguage(String s)
Set the profile language
|
RulesProfile |
setName(String s)
Set the profile name.
|
void |
setParentName(String parentName)
For internal use only.
|
RulesProfile |
setUsed(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.
|
String |
toString() |
@Deprecated public static final String SONAR_WAY_NAME
@Deprecated public static final String SONAR_WAY_FINDBUGS_NAME
@Deprecated public static final String SUN_CONVENTIONS_NAME
@Deprecated public RulesProfile()
@Deprecated public RulesProfile(String name, String language)
@Deprecated public RulesProfile(String name, String language, boolean defaultProfile, boolean provided)
public RulesProfile setName(String s)
@Deprecated public int getVersion()
@Deprecated public RulesProfile setVersion(int version)
@CheckForNull @Deprecated public Boolean getUsed()
@Deprecated public RulesProfile setUsed(Boolean used)
public List<ActiveRule> getActiveRules()
public List<ActiveRule> getActiveRules(boolean acceptDisabledRules)
public RulesProfile removeActiveRule(ActiveRule activeRule)
public RulesProfile addActiveRule(ActiveRule activeRule)
public void setActiveRules(List<ActiveRule> activeRules)
public Boolean getDefaultProfile()
public void setDefaultProfile(Boolean b)
public String getLanguage()
public RulesProfile setLanguage(String s)
@CheckForNull public String getParentName()
public void setParentName(String parentName)
public List<ActiveRule> getActiveRules(RulePriority severity)
public List<ActiveRule> getActiveRulesByRepository(String repositoryKey)
@CheckForNull public ActiveRule getActiveRule(String repositoryKey, String ruleKey)
@CheckForNull public ActiveRule getActiveRuleByConfigKey(String repositoryKey, 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 static RulesProfile create(String name, String language)
public static RulesProfile create()
Copyright © 2009–2016 SonarSource. All rights reserved.