|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.rules.Violation
Issue
.
@Deprecated public class Violation
A class that represents a violation. A violation happens when a resource does not respect a defined rule.
Constructor Summary | |
---|---|
Violation(Rule rule)
Deprecated. since 2.3. Use the factory method create() |
|
Violation(Rule rule,
Resource resource)
Deprecated. since 2.3. Use the factory method create() |
Method Summary | |
---|---|
static Violation |
create(ActiveRule activeRule,
Resource resource)
Deprecated. |
static Violation |
create(Rule rule,
Resource resource)
Deprecated. |
String |
getChecksum()
Deprecated. Checksum is available in decorators executed after the barrier DecoratorBarriers.END_OF_VIOLATION_TRACKING |
Double |
getCost()
Deprecated. |
Date |
getCreatedAt()
Deprecated. |
Integer |
getLineId()
Deprecated. |
String |
getMessage()
Deprecated. |
Integer |
getPermanentId()
Deprecated. For internal use only. |
Integer |
getPersonId()
Deprecated. |
RulePriority |
getPriority()
Deprecated. since 2.5 use getSeverity() instead. See http://jira.codehaus.org/browse/SONAR-1829 |
Resource |
getResource()
Deprecated. |
Rule |
getRule()
Deprecated. |
RulePriority |
getSeverity()
Deprecated. |
boolean |
hasLineId()
Deprecated. |
boolean |
isManual()
Deprecated. |
boolean |
isNew()
Deprecated. A violation is considered as "new" if it has been created after the reference analysis (the "previous" analysis). |
boolean |
isSwitchedOff()
Deprecated. Tells whether this violation is ON or OFF. |
Violation |
setChecksum(String s)
Deprecated. For internal use only. |
Violation |
setCost(Double d)
Deprecated. The cost to fix a violation can't be precisely computed without this information. |
Violation |
setCreatedAt(Date createdAt)
Deprecated. For internal use only |
Violation |
setLineId(Integer lineId)
Deprecated. Sets the violation line. |
Violation |
setManual(boolean b)
Deprecated. For internal use only. |
Violation |
setMessage(String message)
Deprecated. Sets the violation message |
Violation |
setNew(boolean b)
Deprecated. For internal use only. |
Violation |
setPermanentId(Integer i)
Deprecated. For internal use only. |
Violation |
setPersonId(Integer i)
Deprecated. For internal use only. |
Violation |
setPriority(RulePriority priority)
Deprecated. since 2.5 use setSeverity(RulePriority) instead. See http://jira.codehaus.org/browse/SONAR-1829 |
Violation |
setResource(Resource resource)
Deprecated. Sets the resource the violation applies to |
Violation |
setRule(Rule rule)
Deprecated. Sets the rule violated |
Violation |
setSeverity(RulePriority severity)
Deprecated. For internal use only. |
Violation |
setSwitchedOff(boolean b)
Deprecated. Switches off the current violation. |
String |
toString()
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@Deprecated public Violation(Rule rule)
@Deprecated public Violation(Rule rule, Resource resource)
rule
- the rule that has been violatedresource
- the resource the violation should be attached toMethod Detail |
---|
public Resource getResource()
public Violation setResource(Resource resource)
public Rule getRule()
public Violation setRule(Rule rule)
public String getMessage()
public Violation setMessage(String message)
public Integer getLineId()
null
if violation doesn't belong to concrete linehasLineId()
public Violation setLineId(Integer lineId)
lineId
- line number (numeration starts from 1), or null
if violation doesn't belong to concrete line
public boolean hasLineId()
true if violation belongs to concrete line- Since:
- 2.8
public RulePriority getSeverity()
public Violation setSeverity(RulePriority severity)
@Deprecated public RulePriority getPriority()
getSeverity()
instead. See http://jira.codehaus.org/browse/SONAR-1829
@Deprecated public Violation setPriority(RulePriority priority)
setSeverity(RulePriority)
instead. See http://jira.codehaus.org/browse/SONAR-1829
public Double getCost()
setCost(Double)
public Violation setCost(Double d)
public Date getCreatedAt()
public Violation setCreatedAt(Date createdAt)
public Violation setSwitchedOff(boolean b)
b
- if true, the violation is considered OFFpublic boolean isSwitchedOff()
public String getChecksum()
DecoratorBarriers.END_OF_VIOLATION_TRACKING
public Violation setChecksum(String s)
public boolean isNew()
DecoratorBarriers.END_OF_VIOLATION_TRACKING
public Violation setNew(boolean b)
public boolean isManual()
public Violation setManual(boolean b)
public Integer getPermanentId()
public Violation setPermanentId(Integer i)
public Integer getPersonId()
public Violation setPersonId(Integer i)
public String toString()
toString
in class Object
public static Violation create(ActiveRule activeRule, Resource resource)
public static Violation create(Rule rule, Resource resource)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |