Package com.atlassian.bamboo.commit
Class CommitImpl
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.core.BambooEntityObject
-
- com.atlassian.bamboo.commit.CommitImpl
-
- All Implemented Interfaces:
Commit,CommitContext,BambooIdProvider,BambooObject,Cloneable
@Entity public class CommitImpl extends BambooEntityObject implements Commit
-
-
Constructor Summary
Constructors Constructor Description CommitImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFile(CommitFile commitFile)intcompareTo(Object obj)booleanequals(Object o)AuthorgetAuthor()AuthorContextgetAuthorContext()StringgetChangeSetId()Return VCS identifier for this changeset.@NotNull StringgetComment()@NotNull DategetDate()@NotNull List<CommitFile>getFiles()@Nullable RepositoryChangesetgetRepositoryChangeset()@Nullable StringguessChangeSetId()inthashCode()booleanisForeignCommit()True if commit comes from another branch/is not in the ancestry path.voidsetAuthor(Author author)Who made the commitvoidsetChangeSetId(String changeSetId)voidsetComment(String comment)voidsetDate(@NotNull Date date)voidsetFiles(List<CommitFile> files)voidsetForeignCommit(boolean foreignCommit)voidsetRepositoryChangeset(@Nullable RepositoryChangeset repositoryChangeset)StringtoString()-
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
-
-
-
Method Detail
-
getAuthorContext
public AuthorContext getAuthorContext()
- Specified by:
getAuthorContextin interfaceCommitContext- Returns:
AuthorContextof commit author
-
setAuthor
public void setAuthor(Author author)
Description copied from interface:CommitWho made the commit
-
addFile
public void addFile(CommitFile commitFile)
-
getFiles
@NotNull public @NotNull List<CommitFile> getFiles()
- Specified by:
getFilesin interfaceCommitContext- Returns:
ListofCommitFileobjects representing changed files
-
setFiles
public void setFiles(List<CommitFile> files)
-
getComment
@NotNull public @NotNull String getComment()
- Specified by:
getCommentin interfaceCommitContext- Returns:
- the commit comment
-
guessChangeSetId
@Nullable public @Nullable String guessChangeSetId()
- Specified by:
guessChangeSetIdin interfaceCommitContext
-
setComment
public void setComment(String comment)
-
getChangeSetId
public String getChangeSetId()
Description copied from interface:CommitContextReturn VCS identifier for this changeset.- Specified by:
getChangeSetIdin interfaceCommitContext- Returns:
-
setChangeSetId
public void setChangeSetId(String changeSetId)
-
getDate
@NotNull public @NotNull Date getDate()
- Specified by:
getDatein interfaceCommitContext- Returns:
Dateof commit.
-
setDate
public void setDate(@NotNull @NotNull Date date)
-
getRepositoryChangeset
@Nullable public @Nullable RepositoryChangeset getRepositoryChangeset()
- Specified by:
getRepositoryChangesetin interfaceCommit- Returns:
RepositoryChangesetthis commit belongs to
-
setRepositoryChangeset
public void setRepositoryChangeset(@Nullable @Nullable RepositoryChangeset repositoryChangeset)- Specified by:
setRepositoryChangesetin interfaceCommit
-
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
-
setForeignCommit
public void setForeignCommit(boolean foreignCommit)
- Specified by:
setForeignCommitin interfaceCommit
-
hashCode
public int hashCode()
- Overrides:
hashCodein classcom.atlassian.core.bean.EntityObject
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classcom.atlassian.core.bean.EntityObject
-
compareTo
public int compareTo(Object obj)
-
-