Package com.atlassian.bitbucket.scm
Class AbstractDiffCommandParameters
java.lang.Object
com.atlassian.bitbucket.util.BuilderSupport
com.atlassian.bitbucket.scm.AbstractCommandParameters
com.atlassian.bitbucket.scm.AbstractDiffCommandParameters
- Direct Known Subclasses:
CompareDiffCommandParameters
,DiffCommandParameters
,PullRequestDiffCommandParameters
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
AbstractDiffCommandParameters.AbstractBuilder<B extends AbstractDiffCommandParameters.AbstractBuilder<B>>
-
Field Summary
Fields inherited from class com.atlassian.bitbucket.util.BuilderSupport
NOT_BLANK
-
Constructor Summary
ModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionint
int
int
getPaths()
Retrieves the secondary repository from which to generate the diff.boolean
boolean
hasPaths()
protected DiffContext
toContext
(DiffContext.Builder builder) Appends common attributes to the providedDiffContext.Builder
before building it and returning the finalDiffContext
.Methods inherited from class com.atlassian.bitbucket.util.BuilderSupport
addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank
-
Field Details
-
DEFAULT_CONTEXT_LINES
public static final int DEFAULT_CONTEXT_LINES- See Also:
-
-
Constructor Details
-
AbstractDiffCommandParameters
- Parameters:
builder
- a builder containing the assembled parameters- Since:
- 5.4
-
-
Method Details
-
getContextLines
public int getContextLines() -
getMaxLineLength
public int getMaxLineLength() -
getMaxLines
public int getMaxLines() -
getPaths
-
getSecondaryRepository
Retrieves the secondary repository from which to generate the diff. Commits in this repository may only be identified by hash. Any branch or tag names used will always be resolved using the primary repository.- Returns:
- a secondary repository from which to generate the diff
- Since:
- 6.7
-
hasContextLines
public boolean hasContextLines() -
hasPaths
public boolean hasPaths() -
getWhitespace
- Returns:
- optional flag to potentially ignore whitespace
-
toContext
Appends common attributes to the providedDiffContext.Builder
before building it and returning the finalDiffContext
.- Parameters:
builder
- the starting builder to apply common attributes to before building- Returns:
- the
DiffContext
from the provided builder
-