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