org.sonar.api.workflow.internal
Class DefaultReview
java.lang.Object
org.sonar.api.workflow.internal.DefaultReview
- All Implemented Interfaces:
- MutableReview, Review
@Beta
public final class DefaultReview
- extends Object
- implements MutableReview
- Since:
- 3.1
DefaultReview
public DefaultReview()
getViolationId
public Long getViolationId()
setViolationId
public DefaultReview setViolationId(Long violationId)
getReviewId
public Long getReviewId()
- Description copied from interface:
Review
- This method will probably be removed in order to decrease
coupling with database.
- Specified by:
getReviewId
in interface Review
- Returns:
- not-null review id (primary key of the table REVIEWS).
setReviewId
public DefaultReview setReviewId(Long reviewId)
getRuleRepositoryKey
public String getRuleRepositoryKey()
- Specified by:
getRuleRepositoryKey
in interface Review
- Returns:
- not-null rule repository, for example "checkstyle"
setRuleRepositoryKey
public DefaultReview setRuleRepositoryKey(String s)
getRuleKey
public String getRuleKey()
- Specified by:
getRuleKey
in interface Review
- Returns:
- not-null rule key
setRuleKey
public DefaultReview setRuleKey(String s)
getRuleName
public String getRuleName()
- Specified by:
getRuleName
in interface Review
- Returns:
- not-null rule name, in English.
setRuleName
public DefaultReview setRuleName(String s)
getLine
public Long getLine()
- Specified by:
getLine
in interface Review
- Returns:
- optional line, starting from 1
setLine
public DefaultReview setLine(Long line)
isSwitchedOff
public boolean isSwitchedOff()
- Specified by:
isSwitchedOff
in interface Review
setSwitchedOff
public DefaultReview setSwitchedOff(boolean b)
isManual
public boolean isManual()
- Specified by:
isManual
in interface Review
- Returns:
- true if the violation has been created by an automated rule engine,
false if created by an end-user.
setManual
public DefaultReview setManual(boolean manual)
getMessage
public String getMessage()
- Specified by:
getMessage
in interface Review
setMessage
public DefaultReview setMessage(String message)
getStatus
public String getStatus()
- Specified by:
getStatus
in interface Review
setStatus
public DefaultReview setStatus(String s)
- Specified by:
setStatus
in interface MutableReview
getResolution
public String getResolution()
- Specified by:
getResolution
in interface Review
setResolution
public DefaultReview setResolution(@Nullable
String s)
- Specified by:
setResolution
in interface MutableReview
getSeverity
public String getSeverity()
- Specified by:
getSeverity
in interface Review
- Returns:
- not-null severity, from INFO to BLOCKER
setSeverity
public DefaultReview setSeverity(String s)
getProperties
public Map<String,String> getProperties()
- Specified by:
getProperties
in interface Review
- Returns:
- not-null properties
setProperties
public DefaultReview setProperties(Map<String,String> properties)
setPropertiesAsString
public DefaultReview setPropertiesAsString(@Nullable
String s)
createComment
public Comment createComment()
- Specified by:
createComment
in interface MutableReview
getNewComments
public List<Comment> getNewComments()
- Specified by:
getNewComments
in interface MutableReview
setProperty
public DefaultReview setProperty(String key,
@Nullable
String value)
- Specified by:
setProperty
in interface MutableReview
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009-2012 SonarSource. All Rights Reserved.