|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.profiles.RulesProfile
public class RulesProfile
This class is badly named. It should be "QualityProfile". Indeed it does not relate only to rules but to metric thresholds too.
Field Summary | |
---|---|
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 Summary | |
---|---|
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() |
Method Summary | |
---|---|
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> |
getActiveRulesByPlugin(String repositoryKey)
Deprecated. since 2.3 use getActiveRulesByRepository(String) instead. |
List<ActiveRule> |
getActiveRulesByRepository(String repositoryKey)
Get the active rules of a specific repository. |
Boolean |
getDefaultProfile()
|
Boolean |
getEnabled()
Deprecated. since 3.3. Always return true. |
Integer |
getId()
|
String |
getLanguage()
|
String |
getName()
|
String |
getParentName()
For internal use only. |
Boolean |
getProvided()
Deprecated. since 3.3 not replaced |
Boolean |
getUsed()
Deprecated. profile versioning is dropped in 4.4. Always returns -1. |
int |
getVersion()
Deprecated. profile versioning is dropped in 4.4. Always returns -1. |
int |
hashCode()
|
boolean |
isEnabled()
Deprecated. since 3.3. Always return true. |
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 |
setEnabled(Boolean b)
Deprecated. since 3.3. |
RulesProfile |
setLanguage(String s)
Set the profile language |
RulesProfile |
setName(String s)
Set the profile name. |
void |
setParentName(String parentName)
For internal use only. |
void |
setProvided(Boolean b)
Deprecated. since 3.3 not replaced |
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()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@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
Constructor Detail |
---|
@Deprecated public RulesProfile()
@Deprecated public RulesProfile(String name, String language)
@Deprecated public RulesProfile(String name, String language, boolean defaultProfile, boolean provided)
Method Detail |
---|
public Integer getId()
public String getName()
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)
@Deprecated public Boolean getProvided()
@Deprecated public void setProvided(Boolean b)
@Deprecated public Boolean getEnabled()
@Deprecated public boolean isEnabled()
@Deprecated public RulesProfile setEnabled(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)
@Deprecated public List<ActiveRule> getActiveRulesByPlugin(String repositoryKey)
getActiveRulesByRepository(String)
instead.
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 boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Object clone()
clone
in class Object
public String toString()
toString
in class Object
public static RulesProfile create(String name, String language)
public static RulesProfile create()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |