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 classCommitContextImpl.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.Builderbuilder()booleanequals(Object o)AuthorContextgetAuthorContext()@Nullable StringgetBranch()StringgetChangeSetId()Return VCS identifier for this changeset.@NotNull StringgetComment()@NotNull DategetDate()@NotNull List<CommitFile>getFiles()@Nullable StringguessChangeSetId()inthashCode()booleanisForeignCommit()True if commit comes from another branch/is not in the ancestry path.StringtoString()
-
-
-
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:
getAuthorContextin interfaceCommitContext- Returns:
AuthorContextof commit author
-
getFiles
@NotNull public @NotNull List<CommitFile> getFiles()
- Specified by:
getFilesin interfaceCommitContext- Returns:
ListofCommitFileobjects representing changed files
-
getComment
@NotNull public @NotNull String getComment()
- Specified by:
getCommentin interfaceCommitContext- Returns:
- the commit comment
-
getDate
@NotNull public @NotNull Date getDate()
- Specified by:
getDatein interfaceCommitContext- Returns:
Dateof commit.
-
getBranch
@Nullable public @Nullable String getBranch()
-
getChangeSetId
public String getChangeSetId()
Description copied from interface:CommitContextReturn VCS identifier for this changeset.- Specified by:
getChangeSetIdin interfaceCommitContext- Returns:
-
isForeignCommit
public boolean isForeignCommit()
Description copied from interface:CommitContextTrue 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:
isForeignCommitin interfaceCommitContext
-
guessChangeSetId
@Nullable public @Nullable String guessChangeSetId()
- Specified by:
guessChangeSetIdin interfaceCommitContext
-
builder
public static CommitContextImpl.Builder builder()
-
-