com.atlassian.bamboo.commit
Class CommitContextImpl

java.lang.Object
  extended by com.atlassian.bamboo.commit.CommitContextImpl
All Implemented Interfaces:
CommitContext, java.io.Serializable

public class CommitContextImpl
extends java.lang.Object
implements CommitContext, java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
static class CommitContextImpl.Builder
           
 
Constructor Summary
CommitContextImpl(Author author, java.util.List<CommitFile> files, java.lang.String comment, java.util.Date date, java.lang.String changeSetId)
           
CommitContextImpl(Author author, java.util.List<CommitFile> files, java.lang.String comment, java.util.Date date, java.lang.String changeSetId, boolean foreignCommit)
           
 
Method Summary
static CommitContextImpl.Builder builder()
           
 boolean equals(java.lang.Object o)
           
 Author getAuthor()
           
 java.lang.String getBranch()
           
 java.lang.String getChangeSetId()
          Return VCS identifier for this changeset.
 java.lang.String getComment()
           
 java.util.Date getDate()
           
 java.util.List<CommitFile> getFiles()
           
 java.lang.String guessChangeSetId()
           
 int hashCode()
           
 boolean isForeignCommit()
          True if commit comes from another branch/is not in the ancestry path.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommitContextImpl

public CommitContextImpl(Author author,
                         @NotNull
                         java.util.List<CommitFile> files,
                         @NotNull
                         java.lang.String comment,
                         @NotNull
                         java.util.Date date,
                         java.lang.String changeSetId)

CommitContextImpl

public CommitContextImpl(Author author,
                         @NotNull
                         java.util.List<CommitFile> files,
                         @NotNull
                         java.lang.String comment,
                         @NotNull
                         java.util.Date date,
                         java.lang.String changeSetId,
                         boolean foreignCommit)
Method Detail

getAuthor

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

getFiles

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

getComment

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

getDate

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

getBranch

@Nullable
public java.lang.String getBranch()

getChangeSetId

public java.lang.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 java.lang.String guessChangeSetId()
Specified by:
guessChangeSetId in interface CommitContext

builder

public static CommitContextImpl.Builder builder()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2014 Atlassian Software Systems Pty Ltd. All Rights Reserved.