Class DefaultAdHocRule
- java.lang.Object
-
- org.sonar.api.batch.sensor.internal.DefaultStorable
-
- org.sonar.api.batch.sensor.rule.internal.DefaultAdHocRule
-
- All Implemented Interfaces:
AdHocRule
,NewAdHocRule
public class DefaultAdHocRule extends DefaultStorable implements AdHocRule, NewAdHocRule
-
-
Field Summary
-
Fields inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
storage
-
-
Constructor Summary
Constructors Constructor Description DefaultAdHocRule()
DefaultAdHocRule(SensorStorage storage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
description()
Description of the rule.DefaultAdHocRule
description(java.lang.String description)
The description of the rule.void
doSave()
java.lang.String
engineId()
Unique identifier of the external analyzer (e.g.DefaultAdHocRule
engineId(java.lang.String engineId)
Unique identifier of the external analyzer (e.g.java.lang.String
name()
Name of the rule.DefaultAdHocRule
name(java.lang.String name)
The name of the rule.java.lang.String
ruleId()
Unique rule identifier for a givenAdHocRule.engineId()
DefaultAdHocRule
ruleId(java.lang.String ruleId)
Unique rule identifier for a givenNewAdHocRule.engineId(String)
Severity
severity()
Default severity of the rule.DefaultAdHocRule
severity(Severity severity)
Set the severity of the rule.RuleType
type()
Type of the rule.DefaultAdHocRule
type(RuleType type)
Type of the rule.-
Methods inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
save, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.sonar.api.batch.sensor.rule.NewAdHocRule
save
-
-
-
-
Constructor Detail
-
DefaultAdHocRule
public DefaultAdHocRule()
-
DefaultAdHocRule
public DefaultAdHocRule(@Nullable SensorStorage storage)
-
-
Method Detail
-
severity
public DefaultAdHocRule severity(Severity severity)
Description copied from interface:NewAdHocRule
Set the severity of the rule.- Specified by:
severity
in interfaceNewAdHocRule
-
engineId
public java.lang.String engineId()
Description copied from interface:AdHocRule
Unique identifier of the external analyzer (e.g. eslint, pmd, ...)
-
ruleId
public java.lang.String ruleId()
Description copied from interface:AdHocRule
Unique rule identifier for a givenAdHocRule.engineId()
-
name
public java.lang.String name()
Description copied from interface:AdHocRule
Name of the rule.
-
description
@CheckForNull public java.lang.String description()
Description copied from interface:AdHocRule
Description of the rule.- Specified by:
description
in interfaceAdHocRule
-
severity
public Severity severity()
Description copied from interface:AdHocRule
Default severity of the rule.
-
doSave
public void doSave()
- Specified by:
doSave
in classDefaultStorable
-
engineId
public DefaultAdHocRule engineId(java.lang.String engineId)
Description copied from interface:NewAdHocRule
Unique identifier of the external analyzer (e.g. eslint, pmd, ...)- Specified by:
engineId
in interfaceNewAdHocRule
-
ruleId
public DefaultAdHocRule ruleId(java.lang.String ruleId)
Description copied from interface:NewAdHocRule
Unique rule identifier for a givenNewAdHocRule.engineId(String)
- Specified by:
ruleId
in interfaceNewAdHocRule
-
name
public DefaultAdHocRule name(java.lang.String name)
Description copied from interface:NewAdHocRule
The name of the rule.- Specified by:
name
in interfaceNewAdHocRule
-
description
public DefaultAdHocRule description(@Nullable java.lang.String description)
Description copied from interface:NewAdHocRule
The description of the rule.- Specified by:
description
in interfaceNewAdHocRule
-
type
public DefaultAdHocRule type(RuleType type)
Description copied from interface:NewAdHocRule
Type of the rule.- Specified by:
type
in interfaceNewAdHocRule
-
-