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
Constructors -
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.Builderself()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
filterMethods 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:
buildin classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,DiffRequest>
-
contextLines
Description copied from class:AbstractDiffRequest.AbstractBuilderSpecifies the number of context lines to include around added/removed lines.0and 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_LINESfor clarity:contextLines(DiffRequest.DEFAULT_CONTEXT_LINES).- Overrides:
contextLinesin 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_LINESto 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 tonullif blank- Returns:
this
-
path
- Overrides:
pathin classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,DiffRequest>
-
paths
- Overrides:
pathsin classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,DiffRequest>
-
paths
- Overrides:
pathsin classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,DiffRequest>
-
whitespace
- Overrides:
whitespacein classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,DiffRequest>
-
withComments
Whether to include comments associated to the diff in the response to the request- Parameters:
value-trueif the comments should be included.falseotherwise.- Returns:
- this builder
-
self
- Specified by:
selfin classAbstractDiffRequest.AbstractBuilder<DiffRequest.Builder,DiffRequest>
-