Issue
.@Deprecated public class Violation extends Object
Constructor and Description |
---|
Violation(Rule rule)
Deprecated.
since 2.3. Use the factory method
create(ActiveRule, Resource) |
Violation(Rule rule,
Resource resource)
Deprecated.
since 2.3. Use the factory method create()
|
Modifier and Type | Method and Description |
---|---|
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.
|
@Deprecated public Violation(Rule rule)
create(ActiveRule, Resource)
@Deprecated public Violation(Rule rule, Resource resource)
rule
- the rule that has been violatedresource
- the resource the violation should be attached topublic Resource getResource()
public Violation setResource(Resource resource)
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 linepublic boolean hasLineId()
true if violation belongs to concrete line
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-1829public 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 static Violation create(ActiveRule activeRule, Resource resource)
Copyright © 2009–2015 SonarSource. All rights reserved.