Package com.atlassian.bamboo.commit
Class CommitContextImpl
- java.lang.Object
-
- com.atlassian.bamboo.commit.CommitContextImpl
-
- All Implemented Interfaces:
CommitContext
,Serializable
public class CommitContextImpl extends Object implements CommitContext, Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CommitContextImpl.Builder
-
Constructor Summary
Constructors Constructor Description CommitContextImpl(AuthorContext author, @NotNull List<CommitFile> files, @NotNull String comment, @NotNull Date date, String changeSetId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CommitContextImpl.Builder
builder()
boolean
equals(Object o)
AuthorContext
getAuthorContext()
@Nullable String
getBranch()
String
getChangeSetId()
Return VCS identifier for this changeset.@NotNull String
getComment()
@NotNull Date
getDate()
@NotNull List<CommitFile>
getFiles()
@Nullable String
guessChangeSetId()
int
hashCode()
boolean
isForeignCommit()
True if commit comes from another branch/is not in the ancestry path.String
toString()
-
-
-
Constructor Detail
-
CommitContextImpl
public CommitContextImpl(AuthorContext author, @NotNull @NotNull List<CommitFile> files, @NotNull @NotNull String comment, @NotNull @NotNull Date date, String changeSetId)
-
-
Method Detail
-
getAuthorContext
public AuthorContext getAuthorContext()
- Specified by:
getAuthorContext
in interfaceCommitContext
- Returns:
AuthorContext
of commit author
-
getFiles
@NotNull public @NotNull List<CommitFile> getFiles()
- Specified by:
getFiles
in interfaceCommitContext
- Returns:
List
ofCommitFile
objects representing changed files
-
getComment
@NotNull public @NotNull String getComment()
- Specified by:
getComment
in interfaceCommitContext
- Returns:
- the commit comment
-
getDate
@NotNull public @NotNull Date getDate()
- Specified by:
getDate
in interfaceCommitContext
- Returns:
Date
of commit.
-
getBranch
@Nullable public @Nullable String getBranch()
-
getChangeSetId
public String getChangeSetId()
Description copied from interface:CommitContext
Return VCS identifier for this changeset.- Specified by:
getChangeSetId
in interfaceCommitContext
- Returns:
-
isForeignCommit
public boolean isForeignCommit()
Description copied from interface:CommitContext
True if commit comes from another branch/is not in the ancestry path. (DVCS only) It is allowed to return false negatives but not false positives. Will return false if feature not supported by repository plugin. In some cases (git) may return false even if commit originated in different branch due to git limitations.- Specified by:
isForeignCommit
in interfaceCommitContext
-
guessChangeSetId
@Nullable public @Nullable String guessChangeSetId()
- Specified by:
guessChangeSetId
in interfaceCommitContext
-
builder
public static CommitContextImpl.Builder builder()
-
-