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
CommitContextImpl
public CommitContextImpl(Author author,
@NotNull
List<CommitFile> files,
@NotNull
String comment,
@NotNull
Date date,
String changeSetId)
CommitContextImpl
public CommitContextImpl(Author author,
@NotNull
List<CommitFile> files,
@NotNull
String comment,
@NotNull
Date date,
String changeSetId,
boolean foreignCommit)
getAuthor
public Author getAuthor()
- Specified by:
getAuthor
in interface CommitContext
- Returns:
Author
who made the commit
getFiles
@NotNull
public List<CommitFile> getFiles()
- Specified by:
getFiles
in interface CommitContext
- Returns:
List
of CommitFile
objects representing changed files
getComment
@NotNull
public String getComment()
- Specified by:
getComment
in interface CommitContext
- Returns:
- the commit comment
getDate
@NotNull
public Date getDate()
- Specified by:
getDate
in interface CommitContext
- Returns:
Date
of commit.
getBranch
@Nullable
public String getBranch()
getChangeSetId
public String getChangeSetId()
- Description copied from interface:
CommitContext
- Return VCS identifier for this changeset.
- Specified by:
getChangeSetId
in interface CommitContext
- 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 interface CommitContext
guessChangeSetId
@Nullable
public String guessChangeSetId()
- Specified by:
guessChangeSetId
in interface CommitContext
builder
public static CommitContextImpl.Builder builder()
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.