|
||||||||||
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
Name of the default java profile "Sonar way with Findbugs" |
static String |
SONAR_WAY_NAME
Name of the default profile "Sonar Way" |
static String |
SUN_CONVENTIONS_NAME
Name of the default java profile "Sun checks" |
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. |
List<Alert> |
getAlerts()
|
Boolean |
getDefaultProfile()
|
Boolean |
getEnabled()
|
Integer |
getId()
|
String |
getLanguage()
|
String |
getName()
|
String |
getParentName()
For internal use only. |
List<ResourceModel> |
getProjects()
|
Boolean |
getProvided()
|
Boolean |
getUsed()
|
int |
getVersion()
|
int |
hashCode()
|
boolean |
isEnabled()
|
RulesProfile |
removeActiveRule(ActiveRule activeRule)
|
void |
setActiveRules(List<ActiveRule> activeRules)
Set the list of active rules |
void |
setAlerts(List<Alert> alerts)
Sets the list of alerts for the profile |
void |
setDefaultProfile(Boolean b)
Set whether this is the default profile for the language. |
RulesProfile |
setEnabled(Boolean b)
|
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 |
setProjects(List<ResourceModel> projects)
Sets the list of projects attached to the profile |
void |
setProvided(Boolean b)
Set whether the profile is provided by a plugin |
RulesProfile |
setUsed(Boolean used)
|
RulesProfile |
setVersion(int version)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SONAR_WAY_NAME
public static final String SONAR_WAY_FINDBUGS_NAME
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)
public int getVersion()
public RulesProfile setVersion(int version)
public Boolean getUsed()
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 Boolean getProvided()
public void setProvided(Boolean b)
public Boolean getEnabled()
public boolean isEnabled()
public RulesProfile setEnabled(Boolean b)
public String getLanguage()
public RulesProfile setLanguage(String s)
public String getParentName()
public void setParentName(String parentName)
public List<Alert> getAlerts()
public void setAlerts(List<Alert> alerts)
public List<ResourceModel> getProjects()
public void setProjects(List<ResourceModel> projects)
public List<ActiveRule> getActiveRules(RulePriority severity)
@Deprecated public List<ActiveRule> getActiveRulesByPlugin(String repositoryKey)
getActiveRulesByRepository(String)
instead.
public List<ActiveRule> getActiveRulesByRepository(String repositoryKey)
public ActiveRule getActiveRule(String repositoryKey, String ruleKey)
public ActiveRule getActiveRuleByConfigKey(String repositoryKey, String configKey)
public ActiveRule getActiveRule(Rule rule)
public ActiveRule activateRule(Rule rule, 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 |