public static class


extends AbstractDiffRequest.AbstractBuilder<B extends AbstractBuilder<B, R>, R>
   ↳ com.atlassian.stash.util.BuilderSupport
     ↳ com.atlassian.stash.content.AbstractDiffRequest.AbstractBuilder<B extends com.atlassian.stash.content.AbstractDiffRequest.AbstractBuilder<B, R>, R>
       ↳ com.atlassian.stash.content.DiffRequest.Builder


Inherited Fields
From class com.atlassian.stash.util.BuilderSupport
Public Constructors
DiffRequest.Builder(DiffRequest request)
DiffRequest.Builder(Repository repository, String untilId)
Public Methods
@Nonnull DiffRequest build()
@Nonnull DiffRequest.Builder contextLines(int value)
Specifies the number of context lines to include around added/removed lines.
@Nonnull DiffRequest.Builder path(String value)
@Nonnull DiffRequest.Builder paths(String value, String... values)
@Nonnull DiffRequest.Builder paths(Iterable<String> values)
@Nonnull DiffRequest.Builder sinceId(String value)
Specifies the "since" commit for the diff.
@Nonnull DiffRequest.Builder whitespace(DiffWhitespace value)
@Nonnull DiffRequest.Builder withComments(boolean value)
Protected Methods
@Nonnull DiffRequest.Builder self()
Inherited Methods
From class com.atlassian.stash.content.AbstractDiffRequest.AbstractBuilder
From class com.atlassian.stash.util.BuilderSupport
From class java.lang.Object

Public Constructors

public DiffRequest.Builder (DiffRequest request)

public DiffRequest.Builder (Repository repository, String untilId)

Public Methods

@Nonnull public DiffRequest build ()

@Nonnull public DiffRequest.Builder contextLines (int value)

Specifies the number of context lines to include around added/removed lines. 0 and positive values are treated as the number of lines to request. Any negative value is treated as a request for the system-configured default number of lines.

When requesting the default number of context lines, it is encouraged to use DEFAULT_CONTEXT_LINES for clarity: contextLines(DiffRequest.DEFAULT_CONTEXT_LINES).

value the number of context lines to include around added and removed lines in the diff, which may be DEFAULT_CONTEXT_LINES to use the default number
  • this

@Nonnull public DiffRequest.Builder path (String value)

@Nonnull public DiffRequest.Builder paths (String value, String... values)

@Nonnull public DiffRequest.Builder paths (Iterable<String> values)

@Nonnull public DiffRequest.Builder sinceId (String value)

Specifies the "since" commit for the diff. Generally this is an ancestor of the "until" commit, but it is not required to be.

If the "since" and "until" commit are not directly related, the returned diff may not make sense. For example, it may show files as added, removed or modified that have not actually been changed. When an explicit "since" commit is provided, it is recommended to always use an ancestor of the "until" commit.

value the "since" commit's ID, which will be trimmed to null if blank
  • this

@Nonnull public DiffRequest.Builder whitespace (DiffWhitespace value)

@Nonnull public DiffRequest.Builder withComments (boolean value)

Protected Methods

@Nonnull protected DiffRequest.Builder self ()