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 void
addFile(CommitFile commitFile)
int
compareTo(Object obj)
boolean
equals(Object o)
Author
getAuthor()
AuthorContext
getAuthorContext()
String
getChangeSetId()
Return VCS identifier for this changeset.@NotNull String
getComment()
@NotNull Date
getDate()
@NotNull List<CommitFile>
getFiles()
@Nullable RepositoryChangeset
getRepositoryChangeset()
@Nullable String
guessChangeSetId()
int
hashCode()
boolean
isForeignCommit()
True if commit comes from another branch/is not in the ancestry path.void
setAuthor(Author author)
Who made the commitvoid
setChangeSetId(String changeSetId)
void
setComment(String comment)
void
setDate(@NotNull Date date)
void
setFiles(List<CommitFile> files)
void
setForeignCommit(boolean foreignCommit)
void
setRepositoryChangeset(@Nullable RepositoryChangeset repositoryChangeset)
String
toString()
-
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:
getAuthorContext
in interfaceCommitContext
- Returns:
AuthorContext
of commit author
-
setAuthor
public void setAuthor(Author author)
Description copied from interface:Commit
Who made the commit
-
addFile
public void addFile(CommitFile commitFile)
-
getFiles
@NotNull public @NotNull List<CommitFile> getFiles()
- Specified by:
getFiles
in interfaceCommitContext
- Returns:
List
ofCommitFile
objects representing changed files
-
setFiles
public void setFiles(List<CommitFile> files)
-
getComment
@NotNull public @NotNull String getComment()
- Specified by:
getComment
in interfaceCommitContext
- Returns:
- the commit comment
-
guessChangeSetId
@Nullable public @Nullable String guessChangeSetId()
- Specified by:
guessChangeSetId
in interfaceCommitContext
-
setComment
public void setComment(String comment)
-
getChangeSetId
public String getChangeSetId()
Description copied from interface:CommitContext
Return VCS identifier for this changeset.- Specified by:
getChangeSetId
in interfaceCommitContext
- Returns:
-
setChangeSetId
public void setChangeSetId(String changeSetId)
-
getDate
@NotNull public @NotNull Date getDate()
- Specified by:
getDate
in interfaceCommitContext
- Returns:
Date
of commit.
-
setDate
public void setDate(@NotNull @NotNull Date date)
-
getRepositoryChangeset
@Nullable public @Nullable RepositoryChangeset getRepositoryChangeset()
- Specified by:
getRepositoryChangeset
in interfaceCommit
- Returns:
RepositoryChangeset
this commit belongs to
-
setRepositoryChangeset
public void setRepositoryChangeset(@Nullable @Nullable RepositoryChangeset repositoryChangeset)
- Specified by:
setRepositoryChangeset
in interfaceCommit
-
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
-
setForeignCommit
public void setForeignCommit(boolean foreignCommit)
- Specified by:
setForeignCommit
in interfaceCommit
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
compareTo
public int compareTo(Object obj)
-
-