Package com.atlassian.bitbucket.pull
Class PullRequestDiffRequest
java.lang.Object
com.atlassian.bitbucket.pull.AbstractPullRequestRequest
com.atlassian.bitbucket.pull.PullRequestDiffRequest
Request for streaming a diff of a given pull request. The purpose and behaviour of each field is described on its accessor.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.atlassian.bitbucket.pull.AbstractPullRequestRequest
AbstractPullRequestRequest.AbstractBuilder<T extends AbstractPullRequestRequest.AbstractBuilder<T>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndicates the request should supply the default number of context lines for added and removed lines. -
Method Summary
Modifier and TypeMethodDescriptionintRetrieves the numbers of context lines to show around added and removed lines.getPath()booleanRetrieves a flag indicating whether an explicit number of context lines has been requested.booleanMethods inherited from class com.atlassian.bitbucket.pull.AbstractPullRequestRequest
getPullRequestId, getRepositoryId
-
Field Details
-
DEFAULT_CONTEXT_LINES
public static final int DEFAULT_CONTEXT_LINESIndicates the request should supply the default number of context lines for added and removed lines. The default is configurable, so it may be changed by a system administrator. The shipped setting is 10 lines.- See Also:
-
-
Method Details
-
getContextLines
public int getContextLines()Retrieves the numbers of context lines to show around added and removed lines. If the value is0context will be omitted and only added and removed lines will be shown. For positive values, that number of lines will be shown. For negative values, the system-configured default number will be shown.- Returns:
- the number of context lines that should be included around added and removed lines in the diff
-
getDiffType
- Returns:
- the type of diff requested
- Since:
- 5.0
-
getFilter
- Returns:
- an optional filter for this diff to filter out lines (and their surrounding file/hunk/segment)
-
getPath
- Returns:
- the path within the repository to the file to diff
-
getSinceId
- Returns:
- the
sinceIdfor the diff requested - Since:
- 5.0
-
getSrcPath
- Returns:
- the source path, required for
copiesandmoves/renamesandnullfor other types
-
getUntilId
- Returns:
- the
untilIdfor the diff requested - Since:
- 5.0
-
getWhitespace
- Returns:
- the whitespace settings used in the diff
-
hasContextLines
public boolean hasContextLines()Retrieves a flag indicating whether an explicit number of context lines has been requested. When this method returnstrue,getContextLines()will return a value greater than or equal to0, When it returnsfalse,getContextLines()will returnDEFAULT_CONTEXT_LINES.- Returns:
trueif a non-defaultnumber of context lines has been requested; otherwise,falseto use the default number of lines
-
isWithComments
public boolean isWithComments()
-