com.atlassian.bamboo.deployments.versions.service
Class DeploymentVersionVcsChangesetServiceImpl

java.lang.Object
  extended by com.atlassian.bamboo.deployments.versions.service.DeploymentVersionVcsChangesetServiceImpl
All Implemented Interfaces:
DeploymentVersionVcsChangesetService

public class DeploymentVersionVcsChangesetServiceImpl
extends java.lang.Object
implements DeploymentVersionVcsChangesetService


Constructor Summary
DeploymentVersionVcsChangesetServiceImpl(DeploymentVersionVcsChangesetDao deploymentVersionVcsChangesetDao, DeploymentVersionVcsCommitDao deploymentVersionVcsCommitDao, DeploymentVersionService deploymentVersionService, RepositoryDefinitionManager repositoryDefinitionManager, DeploymentVersionChainResultDataCollector deploymentVersionChainResultDataCollector)
           
 
Method Summary
 DeploymentVersionCommitsComparisonResult compareVersionsByChangesets(long deploymentProjectId, DeploymentVersion version1, DeploymentVersion version2, int maxCommits)
          Find all DeploymentVersionVcsChangeset that happened after creation of older version until (and including) the creation of newer version.
 java.util.List<DeploymentVersionVcsChangeset> getChangesetsForDeploymentVersion(DeploymentVersion deploymentVersion)
          Find all DeploymentVersionVcsChangeset associated with a DeploymentVersion
 DeploymentVersionCommitsComparisonResult getChangesetsForNewDeploymentVersion(long deploymentProjectId, PlanResultKey planResultKey, int maxCommits)
          Finds the changesets if a new version would be created from planResultKey.
 int getCommitCountForDeploymentVersion(DeploymentVersion deploymentVersion)
          count of all commits in all changesets associated with a DeploymentVersion
 DeploymentVersionCommitsComparisonResult getLastNCommitsForVersion(long deploymentProjectId, DeploymentVersion deploymentVersion, int maxCommits)
          Find changesets for the version and fetch n last commits.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentVersionVcsChangesetServiceImpl

public DeploymentVersionVcsChangesetServiceImpl(DeploymentVersionVcsChangesetDao deploymentVersionVcsChangesetDao,
                                                DeploymentVersionVcsCommitDao deploymentVersionVcsCommitDao,
                                                DeploymentVersionService deploymentVersionService,
                                                RepositoryDefinitionManager repositoryDefinitionManager,
                                                DeploymentVersionChainResultDataCollector deploymentVersionChainResultDataCollector)
Method Detail

getChangesetsForDeploymentVersion

@NotNull
public java.util.List<DeploymentVersionVcsChangeset> getChangesetsForDeploymentVersion(@NotNull
                                                                                               DeploymentVersion deploymentVersion)
Description copied from interface: DeploymentVersionVcsChangesetService
Find all DeploymentVersionVcsChangeset associated with a DeploymentVersion

Specified by:
getChangesetsForDeploymentVersion in interface DeploymentVersionVcsChangesetService
Parameters:
deploymentVersion - a version

getCommitCountForDeploymentVersion

public int getCommitCountForDeploymentVersion(@NotNull
                                              DeploymentVersion deploymentVersion)
Description copied from interface: DeploymentVersionVcsChangesetService
count of all commits in all changesets associated with a DeploymentVersion

Specified by:
getCommitCountForDeploymentVersion in interface DeploymentVersionVcsChangesetService
Parameters:
deploymentVersion - a version

compareVersionsByChangesets

@NotNull
public DeploymentVersionCommitsComparisonResult compareVersionsByChangesets(long deploymentProjectId,
                                                                                    @NotNull
                                                                                    DeploymentVersion version1,
                                                                                    @NotNull
                                                                                    DeploymentVersion version2,
                                                                                    int maxCommits)
Description copied from interface: DeploymentVersionVcsChangesetService
Find all DeploymentVersionVcsChangeset that happened after creation of older version until (and including) the creation of newer version.

Specified by:
compareVersionsByChangesets in interface DeploymentVersionVcsChangesetService
version1 - 1st version to compare (can be either older or newer than version2)
version2 - 2nd version to compare (can be either older or newer than version1)
maxCommits - maximum number of commits fetched with full information
Returns:

getLastNCommitsForVersion

@NotNull
public DeploymentVersionCommitsComparisonResult getLastNCommitsForVersion(long deploymentProjectId,
                                                                                  DeploymentVersion deploymentVersion,
                                                                                  int maxCommits)
Description copied from interface: DeploymentVersionVcsChangesetService
Find changesets for the version and fetch n last commits.

Specified by:
getLastNCommitsForVersion in interface DeploymentVersionVcsChangesetService
Returns:

getChangesetsForNewDeploymentVersion

@NotNull
public DeploymentVersionCommitsComparisonResult getChangesetsForNewDeploymentVersion(long deploymentProjectId,
                                                                                             PlanResultKey planResultKey,
                                                                                             int maxCommits)
Description copied from interface: DeploymentVersionVcsChangesetService
Finds the changesets if a new version would be created from planResultKey. Doesn't save anything to db,

Specified by:
getChangesetsForNewDeploymentVersion in interface DeploymentVersionVcsChangesetService
Parameters:
deploymentProjectId - id of the deployment project
planResultKey - of the build result we want to create version from
Returns:


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