com.atlassian.bamboo.commit
Class CommitImpl

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.commit.CommitImpl
All Implemented Interfaces:
Commit, CommitContext, BambooIdProvider, BambooObject, Cloneable

public class CommitImpl
extends BambooEntityObject
implements Commit


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Fields inherited from interface com.atlassian.bamboo.commit.Commit
UNKNOWN
 
Constructor Summary
CommitImpl()
           
 
Method Summary
 void addFile(CommitFile commitFile)
           
 int compareTo(Object obj)
           
 boolean equals(Object o)
          This method needs to be here in order to use proper id
 Author getAuthor()
           
 String getChangeSetId()
          Return VCS identifier for this changeset.
 String getComment()
           
 Date getDate()
           
 List<CommitFile> getFiles()
           
 RepositoryChangeset getRepositoryChangeset()
           
 String guessChangeSetId()
           
 int hashCode()
          This method needs to be here in order to use proper id
 boolean isForeignCommit()
          True if commit comes from another branch/is not in the ancestry path.
 void setAuthor(Author author)
          Who made the commit
 void setChangeSetId(String changeSetId)
           
 void setComment(String comment)
           
 void setDate(Date date)
           
 void setFiles(List<CommitFile> files)
           
 void setForeignCommit(boolean foreignCommit)
           
 void setRepositoryChangeset(RepositoryChangeset repositoryChangeset)
           
 String toString()
           
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
getId, setId
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 

Constructor Detail

CommitImpl

public CommitImpl()
Method Detail

getAuthor

public Author getAuthor()
Specified by:
getAuthor in interface CommitContext
Returns:
Author who made the commit

setAuthor

public void setAuthor(Author author)
Description copied from interface: Commit
Who made the commit

Specified by:
setAuthor in interface Commit

addFile

public void addFile(CommitFile commitFile)

getFiles

@NotNull
public List<CommitFile> getFiles()
Specified by:
getFiles in interface CommitContext
Returns:
List of CommitFile objects representing changed files

setFiles

public void setFiles(List<CommitFile> files)
Specified by:
setFiles in interface Commit
Parameters:
files - - files to update this commit with.

getComment

@NotNull
public String getComment()
Specified by:
getComment in interface CommitContext
Returns:
the commit comment

guessChangeSetId

@Nullable
public String guessChangeSetId()
Specified by:
guessChangeSetId in interface CommitContext

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 interface CommitContext
Returns:

setChangeSetId

public void setChangeSetId(String changeSetId)

getDate

@NotNull
public Date getDate()
Specified by:
getDate in interface CommitContext
Returns:
Date of commit.

setDate

public void setDate(@NotNull
                    Date date)

getRepositoryChangeset

@Nullable
public RepositoryChangeset getRepositoryChangeset()
Specified by:
getRepositoryChangeset in interface Commit
Returns:
RepositoryChangeset this commit belongs to

setRepositoryChangeset

public void setRepositoryChangeset(@Nullable
                                   RepositoryChangeset repositoryChangeset)
Specified by:
setRepositoryChangeset in interface Commit

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

setForeignCommit

public void setForeignCommit(boolean foreignCommit)
Specified by:
setForeignCommit in interface Commit

hashCode

public int hashCode()
Description copied from class: BambooEntityObject
This method needs to be here in order to use proper id

Overrides:
hashCode in class BambooEntityObject

equals

public boolean equals(Object o)
Description copied from class: BambooEntityObject
This method needs to be here in order to use proper id

Overrides:
equals in class BambooEntityObject

compareTo

public int compareTo(Object obj)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.