com.atlassian.bamboo.v2.build
Class BuildChangesImpl

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.BuildChangesImpl
All Implemented Interfaces:
BuildChanges, Serializable

public class BuildChangesImpl
extends Object
implements BuildChanges

See Also:
Serialized Form

Constructor Summary
BuildChangesImpl()
           
BuildChangesImpl(BuildChanges other)
           
 
Method Summary
 void addRepositoryChanges(BuildRepositoryChanges repositoryChanges)
           
 boolean equals(Object o)
           
 BuildRepositoryChanges getBuildRepositoryChanges(long repositoryId)
           
 com.google.common.collect.ImmutableList<CommitContext> getChanges()
          Get changes from all repositories
 List<CommitContext> getChanges(long repositoryId)
          List of Commit objects that triggered off this particular build.
 String getIntegrationBranchVcsRevision()
          The current revision of the integration branch, that one that was detected during detecting all other changes.
 long getIntegrationRepositoryId()
           
 String getPreviousVcsRevisionKey(long repositoryId)
          Returns a Repository dependent "id" for previous state of repository, so change is between previousVcsRevisionKey and vcsRevisionKey This is value is taken from the Repository as to be internally consistent
 Iterable<BuildRepositoryChanges> getRepositoryChanges()
           
 int getSkippedCommitsCount(long repositoryId)
          The number of commits that were included in this buildChanges, but their details were skipped (because there was too many commits to keep them all in this buildChanges)
 String getVcsLastChangeRevisionKey(long repositoryId)
          Returns a Repository dependent "id" for last change for repository subpath - currently implemented for Subversion ONLY This is value is taken from the Repository as to be internally consistent
 PlanVcsRevisionData getVcsRevisionData(long repositoryId)
          Returns PlanVcsRevisionData containing Repository dependent vcs revision data for this checkout.
 String getVcsRevisionKey(long repositoryId)
          Returns a Repository dependent "id" for this checkout.
 int hashCode()
           
 void setChanges(long repositoryId, List<CommitContext> changes)
           
 void setIntegrationBranchVcsRevision(String revision)
           
 void setIntegrationRepositoryId(long integrationRepositoryId)
           
 void setPreviousVcsRevisionKey(long repositoryId, String previousVcsRevisionKey)
           
 void setSkippedCommitsCount(long repositoryId, int skippedCommitsCount)
           
 void setVcsLastChangeRevisionKey(long repositoryId, String vcsLastChangeRevisionKey)
           
 void setVcsRevisionKey(long repositoryId, String vcsRevisionKey)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BuildChangesImpl

public BuildChangesImpl(@NotNull
                        BuildChanges other)

BuildChangesImpl

public BuildChangesImpl()
Method Detail

addRepositoryChanges

public void addRepositoryChanges(@NotNull
                                 BuildRepositoryChanges repositoryChanges)
Specified by:
addRepositoryChanges in interface BuildChanges

getRepositoryChanges

public Iterable<BuildRepositoryChanges> getRepositoryChanges()
Specified by:
getRepositoryChanges in interface BuildChanges

getVcsRevisionKey

@Nullable
public String getVcsRevisionKey(long repositoryId)
Description copied from interface: BuildChanges
Returns a Repository dependent "id" for this checkout. e.g. date timestamp for CVS, revision number for SVN etc. This is value is taken from the Repository as to be internally consistent

Specified by:
getVcsRevisionKey in interface BuildChanges
Returns:
Revision "id"

setVcsRevisionKey

public void setVcsRevisionKey(long repositoryId,
                              @NotNull
                              String vcsRevisionKey)
Specified by:
setVcsRevisionKey in interface BuildChanges

getVcsRevisionData

@NotNull
public PlanVcsRevisionData getVcsRevisionData(long repositoryId)
Description copied from interface: BuildChanges
Returns PlanVcsRevisionData containing Repository dependent vcs revision data for this checkout.

Specified by:
getVcsRevisionData in interface BuildChanges
Returns:

getPreviousVcsRevisionKey

public String getPreviousVcsRevisionKey(long repositoryId)
Description copied from interface: BuildChanges
Returns a Repository dependent "id" for previous state of repository, so change is between previousVcsRevisionKey and vcsRevisionKey This is value is taken from the Repository as to be internally consistent

Specified by:
getPreviousVcsRevisionKey in interface BuildChanges
Returns:

setPreviousVcsRevisionKey

public void setPreviousVcsRevisionKey(long repositoryId,
                                      @Nullable
                                      String previousVcsRevisionKey)
Specified by:
setPreviousVcsRevisionKey in interface BuildChanges

getVcsLastChangeRevisionKey

public String getVcsLastChangeRevisionKey(long repositoryId)
Description copied from interface: BuildChanges
Returns a Repository dependent "id" for last change for repository subpath - currently implemented for Subversion ONLY This is value is taken from the Repository as to be internally consistent

Specified by:
getVcsLastChangeRevisionKey in interface BuildChanges
Returns:

setVcsLastChangeRevisionKey

public void setVcsLastChangeRevisionKey(long repositoryId,
                                        String vcsLastChangeRevisionKey)
Specified by:
setVcsLastChangeRevisionKey in interface BuildChanges

getChanges

@NotNull
public List<CommitContext> getChanges(long repositoryId)
Description copied from interface: BuildChanges
List of Commit objects that triggered off this particular build. Returns empty collection if no changes returned.

Specified by:
getChanges in interface BuildChanges
Returns:
List of Commits. May be empty

getChanges

@NotNull
public com.google.common.collect.ImmutableList<CommitContext> getChanges()
Description copied from interface: BuildChanges
Get changes from all repositories

Specified by:
getChanges in interface BuildChanges
Returns:

setChanges

public void setChanges(long repositoryId,
                       @NotNull
                       List<CommitContext> changes)
Specified by:
setChanges in interface BuildChanges

getSkippedCommitsCount

public int getSkippedCommitsCount(long repositoryId)
Description copied from interface: BuildChanges
The number of commits that were included in this buildChanges, but their details were skipped (because there was too many commits to keep them all in this buildChanges)

Specified by:
getSkippedCommitsCount in interface BuildChanges
Returns:
number of skipped commits

setSkippedCommitsCount

public void setSkippedCommitsCount(long repositoryId,
                                   int skippedCommitsCount)
Specified by:
setSkippedCommitsCount in interface BuildChanges

getIntegrationBranchVcsRevision

public String getIntegrationBranchVcsRevision()
Description copied from interface: BuildChanges
The current revision of the integration branch, that one that was detected during detecting all other changes. Used by automerge tool.

Specified by:
getIntegrationBranchVcsRevision in interface BuildChanges
Returns:
Revision "id"

setIntegrationBranchVcsRevision

public void setIntegrationBranchVcsRevision(@NotNull
                                            String revision)
Specified by:
setIntegrationBranchVcsRevision in interface BuildChanges

getIntegrationRepositoryId

public long getIntegrationRepositoryId()
Specified by:
getIntegrationRepositoryId in interface BuildChanges

setIntegrationRepositoryId

public void setIntegrationRepositoryId(long integrationRepositoryId)
Specified by:
setIntegrationRepositoryId in interface BuildChanges

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

getBuildRepositoryChanges

@NotNull
public BuildRepositoryChanges getBuildRepositoryChanges(long repositoryId)
Specified by:
getBuildRepositoryChanges in interface BuildChanges
Parameters:
repositoryId - repository id
Returns:
complete BuildRepositoryChanges object for a specified repository id.


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