public class

PullRequestDiffRequest

extends AbstractPullRequestRequest
java.lang.Object
   ↳ com.atlassian.bitbucket.pull.AbstractPullRequestRequest
     ↳ com.atlassian.bitbucket.pull.PullRequestDiffRequest

Class Overview

Request arguments for streamDiff(PullRequestDiffRequest, DiffContentCallback).

Summary

Nested Classes
class PullRequestDiffRequest.Builder  
Constants
int DEFAULT_CONTEXT_LINES Indicates the request should supply the default number of context lines for added and removed lines.
Public Methods
int getContextLines()
Retrieves the numbers of context lines to show around added and removed lines.
@Nullable CommentThreadDiffAnchorType getDiffType()
@Nullable DiffContentFilter getFilter()
@Nullable String getPath()
@Nullable String getSinceId()
@Nullable String getSrcPath()
@Nullable String getUntilId()
@Nonnull DiffWhitespace getWhitespace()
boolean hasContextLines()
Retrieves a flag indicating whether an explicit number of context lines has been requested.
boolean isWithComments()
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.pull.AbstractPullRequestRequest
From class java.lang.Object

Constants

public static final int DEFAULT_CONTEXT_LINES

Indicates 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.

Constant Value: -1 (0xffffffff)

Public Methods

public int getContextLines ()

Retrieves the numbers of context lines to show around added and removed lines. If the value is 0 context 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

@Nullable public CommentThreadDiffAnchorType getDiffType ()

Returns
  • the type of diff requested

@Nullable public DiffContentFilter getFilter ()

Returns
  • an optional filter for this diff to filter out lines (and their surrounding file/hunk/segment)

@Nullable public String getPath ()

Returns
  • the path within the repository to the file to diff

@Nullable public String getSinceId ()

Returns
  • the sinceId for the diff requested

@Nullable public String getSrcPath ()

Returns

@Nullable public String getUntilId ()

Returns
  • the untilId for the diff requested

@Nonnull public DiffWhitespace getWhitespace ()

Returns
  • the whitespace settings used in the diff

public boolean hasContextLines ()

Retrieves a flag indicating whether an explicit number of context lines has been requested. When this method returns true, getContextLines() will return a value greater than or equal to 0, When it returns false, getContextLines() will return DEFAULT_CONTEXT_LINES.

Returns
  • true if a non-default number of context lines has been requested; otherwise, false to use the default number of lines

public boolean isWithComments ()