public class SourceQuery extends Query<Source>
Modifier and Type | Field and Description |
---|---|
static String |
BASE_URL |
DEFAULT_TIMEOUT_MILLISECONDS
Constructor and Description |
---|
SourceQuery(String resourceKeyOrId) |
Modifier and Type | Method and Description |
---|---|
static SourceQuery |
create(String resourceKeyOrId) |
static SourceQuery |
createWithHighlightedSyntax(String resourceKeyOrId) |
int |
getFrom() |
Class<Source> |
getModelClass() |
String |
getResourceKeyOrId() |
int |
getTo() |
String |
getUrl()
Must start with a slash, for example: /api/metrics
|
boolean |
isHighlightedSyntax() |
SourceQuery |
setFromLineToLine(int from,
int excludedTo)
Get only a few lines
|
SourceQuery |
setHighlightedSyntax(boolean b) |
SourceQuery |
setLinesFromLine(int from,
int length) |
SourceQuery |
setResourceKeyOrId(String resourceKeyOrId) |
appendUrlParameter, appendUrlParameter, appendUrlParameter, appendUrlParameter, encode, getBody, getLocale, getTimeoutMilliseconds, setLocale, setTimeoutMilliseconds
public static final String BASE_URL
public SourceQuery(String resourceKeyOrId)
public String getResourceKeyOrId()
public SourceQuery setResourceKeyOrId(String resourceKeyOrId)
public int getFrom()
public SourceQuery setFromLineToLine(int from, int excludedTo)
from
- Index of the first line, starts to 1excludedTo
- Index of the last line (excluded).public SourceQuery setLinesFromLine(int from, int length)
public int getTo()
public boolean isHighlightedSyntax()
public SourceQuery setHighlightedSyntax(boolean b)
public String getUrl()
AbstractQuery
IMPORTANT: In implementations of this method we must use helper methods to construct URL.
public Class<Source> getModelClass()
getModelClass
in class Query<Source>
public static SourceQuery create(String resourceKeyOrId)
public static SourceQuery createWithHighlightedSyntax(String resourceKeyOrId)
Copyright © 2009-2012 SonarSource. All Rights Reserved.