Package com.atlassian.bitbucket.content
Class DiffRequest.Builder
java.lang.Object
com.atlassian.bitbucket.util.BuilderSupport
com.atlassian.bitbucket.content.AbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,DiffRequest>
com.atlassian.bitbucket.content.DiffRequest.Builder
- Enclosing class:
- DiffRequest
public static class DiffRequest.Builder
extends AbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,DiffRequest>
-
Field Summary
Fields inherited from class com.atlassian.bitbucket.util.BuilderSupport
NOT_BLANK
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionautoSrcPath
(boolean value) build()
contextLines
(int value) Specifies the number of context lines to include around added/removed lines.secondaryRepository
(Repository value) protected DiffRequest.Builder
self()
Specifies the "since" commit for the diff.whitespace
(DiffWhitespace value) withComments
(boolean value) Whether to include comments associated to the diff in the response to the requestMethods inherited from class com.atlassian.bitbucket.content.AbstractDiffRequest.AbstractBuilder
filter
Methods inherited from class com.atlassian.bitbucket.util.BuilderSupport
addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank
-
Constructor Details
-
Builder
-
Builder
-
-
Method Details
-
autoSrcPath
-
build
- Specified by:
build
in classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,
DiffRequest>
-
contextLines
Description copied from class:AbstractDiffRequest.AbstractBuilder
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
AbstractDiffRequest.DEFAULT_CONTEXT_LINES
for clarity:contextLines(DiffRequest.DEFAULT_CONTEXT_LINES)
.- Overrides:
contextLines
in classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,
DiffRequest> - Parameters:
value
- the number of context lines to include around added and removed lines in the diff, which may beAbstractDiffRequest.DEFAULT_CONTEXT_LINES
to use the default number- Returns:
this
-
secondaryRepository
- Parameters:
value
- the secondary repository from which to generate the diff- Returns:
this
- Since:
- 6.7
-
sinceId
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.
- Parameters:
value
- the "since" commit's ID, which will be trimmed tonull
if blank- Returns:
this
-
path
- Overrides:
path
in classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,
DiffRequest>
-
paths
- Overrides:
paths
in classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,
DiffRequest>
-
paths
- Overrides:
paths
in classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,
DiffRequest>
-
whitespace
- Overrides:
whitespace
in classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,
DiffRequest>
-
withComments
Whether to include comments associated to the diff in the response to the request- Parameters:
value
-true
if the comments should be included.false
otherwise.- Returns:
- this builder
-
self
- Specified by:
self
in classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,
DiffRequest>
-