org.sonar.wsclient.services
Class ViolationQuery

java.lang.Object
  extended by org.sonar.wsclient.services.AbstractQuery<MODEL>
      extended by org.sonar.wsclient.services.Query<Violation>
          extended by org.sonar.wsclient.services.ViolationQuery

public class ViolationQuery
extends Query<Violation>


Field Summary
static String BASE_URL
           
 
Fields inherited from class org.sonar.wsclient.services.AbstractQuery
DEFAULT_TIMEOUT_MILLISECONDS
 
Constructor Summary
ViolationQuery(String resourceKeyOrId)
           
 
Method Summary
static ViolationQuery createForResource(Resource resource)
           
static ViolationQuery createForResource(String resourceIdOrKey)
           
 String[] getCategories()
           
 int getDepth()
           
 Boolean getIncludeReview()
           
 Integer getLimit()
           
 Class<Violation> getModelClass()
           
 String getOutput()
           
 String[] getPriorities()
          Deprecated. since 2.5 use getSeverities() instead. See http://jira.codehaus.org/browse/SONAR-1829
 String[] getQualifiers()
           
 String[] getRuleKeys()
           
 String[] getScopes()
           
 String[] getSeverities()
           
 String getUrl()
          Must start with a slash, for example: /api/metrics
 ViolationQuery setCategories(String... categories)
           
 ViolationQuery setDepth(int depth)
           
 ViolationQuery setIncludeReview(Boolean includeReview)
           
 ViolationQuery setLimit(Integer limit)
           
 ViolationQuery setOutput(String output)
           
 ViolationQuery setPriorities(String... priorities)
          Deprecated. since 2.5 use setSeverities(String...) instead. See http://jira.codehaus.org/browse/SONAR-1829
 ViolationQuery setQualifiers(String... qualifiers)
           
 ViolationQuery setRuleKeys(String... ruleKeys)
           
 ViolationQuery setScopes(String... scopes)
           
 ViolationQuery setSeverities(String... severities)
           
 
Methods inherited from class org.sonar.wsclient.services.AbstractQuery
appendUrlParameter, appendUrlParameter, appendUrlParameter, encode, getBody, getLocale, getTimeoutMilliseconds, setLocale, setTimeoutMilliseconds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_URL

public static final String BASE_URL
See Also:
Constant Field Values
Constructor Detail

ViolationQuery

public ViolationQuery(String resourceKeyOrId)
Method Detail

getScopes

public String[] getScopes()

setScopes

public ViolationQuery setScopes(String... scopes)

getQualifiers

public String[] getQualifiers()

setQualifiers

public ViolationQuery setQualifiers(String... qualifiers)

getRuleKeys

public String[] getRuleKeys()

setRuleKeys

public ViolationQuery setRuleKeys(String... ruleKeys)

getCategories

public String[] getCategories()

setCategories

public ViolationQuery setCategories(String... categories)

getSeverities

public String[] getSeverities()
Since:
2.5

setSeverities

public ViolationQuery setSeverities(String... severities)
Since:
2.5

getPriorities

@Deprecated
public String[] getPriorities()
Deprecated. since 2.5 use getSeverities() instead. See http://jira.codehaus.org/browse/SONAR-1829


setPriorities

@Deprecated
public ViolationQuery setPriorities(String... priorities)
Deprecated. since 2.5 use setSeverities(String...) instead. See http://jira.codehaus.org/browse/SONAR-1829


getDepth

public int getDepth()

setDepth

public ViolationQuery setDepth(int depth)

getLimit

public Integer getLimit()
Since:
2.5

setLimit

public ViolationQuery setLimit(Integer limit)
Since:
2.5

getIncludeReview

public Boolean getIncludeReview()
Since:
2.8

setIncludeReview

public ViolationQuery setIncludeReview(Boolean includeReview)
Since:
2.8

getOutput

public String getOutput()
Since:
2.8

setOutput

public ViolationQuery setOutput(String output)
Since:
2.8

getUrl

public String getUrl()
Description copied from class: AbstractQuery
Must start with a slash, for example: /api/metrics

IMPORTANT: In implementations of this method we must use helper methods to construct URL.

Specified by:
getUrl in class AbstractQuery<Violation>
See Also:
AbstractQuery.encode(String), AbstractQuery.appendUrlParameter(StringBuilder, String, Object), AbstractQuery.appendUrlParameter(StringBuilder, String, Object[]), AbstractQuery.appendUrlParameter(StringBuilder, String, Date, boolean)

getModelClass

public Class<Violation> getModelClass()
Specified by:
getModelClass in class Query<Violation>

createForResource

public static ViolationQuery createForResource(Resource resource)

createForResource

public static ViolationQuery createForResource(String resourceIdOrKey)


Copyright © 2009-2012 SonarSource. All Rights Reserved.