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

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

public class DeploymentVersionServiceImpl
extends Object
implements DeploymentVersionService


Constructor Summary
DeploymentVersionServiceImpl(DeploymentProjectDao deploymentProjectDao, DeploymentVersionDao deploymentVersionDao, ResultsSummaryManager resultsSummaryManager, DeploymentVersionChainResultDataCollector deploymentVersionChainResultDataCollector, com.opensymphony.xwork2.TextProvider textProvider, DeploymentVersionVcsChangesetDao deploymentVersionVcsChangesetDao, DeploymentVersionLinkedJiraIssueDao deploymentVersionLinkedJiraIssueDao, VersionNamingService versionNamingService, EnvironmentService environmentService, BambooPermissionManager bambooPermissionManager, GravatarService gravatarService, BambooUserManager bambooUserService, VariableDefinitionManager variableDefinitionManager, VariableDefinitionFactory variableDefinitionFactory, CustomVariableContext customVariableContext, com.atlassian.event.api.EventPublisher eventPublisher, CachedPlanManager cachedPlanManager, ScopedExclusionService scopedExclusionService, ResultsSummaryVariableAccessor resultsSummaryVariableAccessor)
           
 
Method Summary
 DeploymentVersion createDeploymentVersion(long deploymentProjectId, PlanResultKey planResultKey)
          Create a deployment version out of a deployment project and plan result.
 DeploymentVersion createDeploymentVersion(long deploymentProjectId, PlanResultKey planResultKey, com.atlassian.user.User user, String versionName, String nextVersionName)
          Create a deployment version with a specific name.
 Map<DeploymentVersion,Integer> findLatestKnownVersionsForEnvironmentsOfDeploymentProject(DeploymentProject deploymentProject)
          Find all DeploymentVersion that are currently deployed on environments of a DeploymentProject For each version found give number of environments it is present on.
 DeploymentVersion findNextVersionContainingResult(long deploymentProjectId, PlanResultKey planResultKey)
          Find the first version that is created from a result which is later than current result (not taking custom revision into account)
 DeploymentVersion findPreviousVersion(long deploymentProjectId, long versionId)
           
 List<DeploymentVersion> findVersionsAssociatedWithJiraIssue(long deploymentProjectId, String issueKey)
          Find all the versions of a DeploymentProject that are associated with a JIRA issue
 com.google.common.collect.Multimap<DeploymentProject,DeploymentVersion> findVersionsAssociatedWithJiraIssue(String issueKey)
          Find all the version that are associated with a JIRA issue, grouped by DeploymentProject
 List<DeploymentVersion> findVersionsBetween(long deploymentProjectId, DeploymentVersion version1, DeploymentVersion version2)
          Find versions created between version1 and version2.
 List<DeploymentVersion> getDeploymentProjectVersions(long deploymentProjectId)
          Retrieves the list of all the version for the deployment project, sorted by CreationDate (the most recent Deployment Versions will be returned as firsts)
 DeploymentVersion getDeploymentVersion(long deploymentVersionId)
          Get DeploymentVersion by id
 DeploymentVersion getDeploymentVersionByName(String existingVersionName, long deploymentProjectId)
          Get a specific version by name
 String getEvaluatedVersionName(String nextVersionName, Map<String,VariableDefinitionContext> variables, Set<String> variablesToIncrement)
           
 String getIncrementedVersionName(String versionName)
          Calculates an increment of a version name.
 DeploymentVersion getLatestVersionForProject(long deploymentProjectId)
          Find the latest version for a deployment project regardless of branch used to create it.
 DeploymentVersion getLatestVersionForProject(long deploymentProjectId, PlanKey branchKey)
          Find the latest version for a deployment project.
 DeploymentVersionStatus getLatestVersionStatus(long deploymentVersionId)
           
 DeploymentVersion getOrCreateDeploymentVersion(long deploymentProjectId, PlanResultKey planResultKey)
          Given a build result, find a deployment version that matches it, or create it if it doesn't exist.
 Map<String,VariableDefinitionContext> getPossibleVersionVariables(ImmutablePlan linkedPlan, boolean includeUndeterminable)
          Provides a map of variables which might show up on a version.
 Map<String,VariableDefinitionContext> getPossibleVersionVariables(ImmutablePlan linkedPlan, PlanResultKey planResultKey, boolean includeUndeterminable)
          Provides a map of variables which might show up on a version.
 Set<PlanResultKey> getRelatedPlanResultKeys(long deploymentVersionId)
           
 DeploymentVersion getRelatedVersion(long deploymentProjectId, PlanResultKey planResultKey)
          Find latest version of a deployment project that is related to specific plan result.
 Set<String> getResultPlanKeysHavingDeploymentProjectVersions(long deploymentProjectId)
          Returns keys of result plans (branch) that have at least one deployment project version (release)
 Map<String,Artifact> getVersionArtifacts(DeploymentVersion deploymentVersion)
          Find all Artifact related to a version.
 String getVersionNamePreview(ResultsSummary resultsSummary, String versionName)
          Given a version name and a result summary, what would the version name look like after substitution.
 int getVersionsCount()
          Count all versions
 int getVersionsCountForProject(long deploymentProjectId)
          Count versions related to deployment project
 boolean hasVersionsUnrelatedToBranch(long deploymentProjectId, PlanKey branchKey)
          Test if there are DeploymentVersions in a DeploymentProject that are unrelated to given branch
 boolean isFromTheSameBranch(long firstVersionId, long secondVersionId)
          Checks if both deployment versions come from the same branch
 boolean isFromTheSameBranch(String planKey, long versionId)
          Checks if the specified build result is on the same branch as the specified version ID
 boolean isVersionNameConflicting(long deploymentProjectId, String name)
          Check whether the version name is already being used by another version within this project
 DeploymentVersion renameVersion(long deploymentProjectId, DeploymentVersion deploymentVersion, String newVersionName)
          Rename a version.
 void resetVersionsAge(DeploymentVersion deploymentVersion)
          Resets version's age to 0.
 List<DeploymentVersion> searchVersionsByBranch(long deploymentProjectId, PlanKey branchKey)
          Search for deployment versions in a project whose name contains the searchTerm, sorted by CreationDate (the most recent Deployment Versions will be returned as firsts)
 List<DeploymentVersion> searchVersionsByBranchAndName(long deploymentProjectId, PlanKey branchKey, String searchTerm)
          Search for deployment versions in a project whose name contains the searchTerm, sorted by CreationDate (the most recent Deployment Versions will be returned as firsts)
 List<DeploymentVersion> searchVersionsByName(long deploymentProjectId, String searchTerm)
          Search for deployment versions in a project whose name contains the searchTerm, sorted by CreationDate (the most recent Deployment Versions will be returned as firsts)
 void updatePlanKey(PlanKey originalPlanKey, PlanKey newPlanKey)
          Update planKey in DeploymentVersion's related entities when plan key has changed (ie after moving plan)
 DeploymentVersionStatus updateVersionStatus(long deploymentVersionId, DeploymentVersionState status, String userName)
          Updates the version status for given deployment version.
 ErrorCollection validateCreateDeploymentVersion(long deploymentProjectId, PlanResultKey planResultKey, String name, String nextVersionName)
          Validates values to be used for creating a new version.
 ErrorCollection validateDeploymentVersionRename(long deploymentProjectId, DeploymentVersion deploymentVersion, String name)
          Validates values to be used for renaming version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentVersionServiceImpl

public DeploymentVersionServiceImpl(@NotNull
                                    DeploymentProjectDao deploymentProjectDao,
                                    @NotNull
                                    DeploymentVersionDao deploymentVersionDao,
                                    @NotNull
                                    ResultsSummaryManager resultsSummaryManager,
                                    @NotNull
                                    DeploymentVersionChainResultDataCollector deploymentVersionChainResultDataCollector,
                                    @NotNull
                                    com.opensymphony.xwork2.TextProvider textProvider,
                                    @NotNull
                                    DeploymentVersionVcsChangesetDao deploymentVersionVcsChangesetDao,
                                    @NotNull
                                    DeploymentVersionLinkedJiraIssueDao deploymentVersionLinkedJiraIssueDao,
                                    @NotNull
                                    VersionNamingService versionNamingService,
                                    @NotNull
                                    EnvironmentService environmentService,
                                    @NotNull
                                    BambooPermissionManager bambooPermissionManager,
                                    @NotNull
                                    GravatarService gravatarService,
                                    @NotNull
                                    BambooUserManager bambooUserService,
                                    @NotNull
                                    VariableDefinitionManager variableDefinitionManager,
                                    @NotNull
                                    VariableDefinitionFactory variableDefinitionFactory,
                                    @NotNull
                                    CustomVariableContext customVariableContext,
                                    @NotNull
                                    com.atlassian.event.api.EventPublisher eventPublisher,
                                    @NotNull
                                    CachedPlanManager cachedPlanManager,
                                    @NotNull
                                    ScopedExclusionService scopedExclusionService,
                                    @NotNull
                                    ResultsSummaryVariableAccessor resultsSummaryVariableAccessor)
Method Detail

validateDeploymentVersionRename

@NotNull
public ErrorCollection validateDeploymentVersionRename(long deploymentProjectId,
                                                               @NotNull
                                                               DeploymentVersion deploymentVersion,
                                                               @Nullable
                                                               String name)
Description copied from interface: DeploymentVersionService
Validates values to be used for renaming version.

Specified by:
validateDeploymentVersionRename in interface DeploymentVersionService
Returns:
errorCollection containing any errors found. If no errors, an empty errorCollection will be returned.

renameVersion

@NotNull
public DeploymentVersion renameVersion(long deploymentProjectId,
                                               @NotNull
                                               DeploymentVersion deploymentVersion,
                                               @NotNull
                                               String newVersionName)
                                throws WebValidationException
Description copied from interface: DeploymentVersionService
Rename a version.

Specified by:
renameVersion in interface DeploymentVersionService
Returns:
deploymentVersion with the name changed
Throws:
WebValidationException

validateCreateDeploymentVersion

@NotNull
public ErrorCollection validateCreateDeploymentVersion(long deploymentProjectId,
                                                               @NotNull
                                                               PlanResultKey planResultKey,
                                                               @Nullable
                                                               String name,
                                                               @Nullable
                                                               String nextVersionName)
Description copied from interface: DeploymentVersionService
Validates values to be used for creating a new version.

Specified by:
validateCreateDeploymentVersion in interface DeploymentVersionService
Returns:
errorCollection containing any errors found. If no errors, an empty errorCollection will be returned.

isVersionNameConflicting

public boolean isVersionNameConflicting(long deploymentProjectId,
                                        @NotNull
                                        String name)
Description copied from interface: DeploymentVersionService
Check whether the version name is already being used by another version within this project

Specified by:
isVersionNameConflicting in interface DeploymentVersionService
Parameters:
deploymentProjectId - project to filter by
name - to check
Returns:
true if name is already being used.

getOrCreateDeploymentVersion

@NotNull
public DeploymentVersion getOrCreateDeploymentVersion(long deploymentProjectId,
                                                              @NotNull
                                                              PlanResultKey planResultKey)
                                               throws WebValidationException
Description copied from interface: DeploymentVersionService
Given a build result, find a deployment version that matches it, or create it if it doesn't exist. Uses automatic naming.

Specified by:
getOrCreateDeploymentVersion in interface DeploymentVersionService
Parameters:
deploymentProjectId - of project to create version for
planResultKey - of the result to pull artifacts from
Returns:
deployment version
Throws:
WebValidationException

createDeploymentVersion

@NotNull
public DeploymentVersion createDeploymentVersion(long deploymentProjectId,
                                                         @NotNull
                                                         PlanResultKey planResultKey)
                                          throws WebValidationException
Description copied from interface: DeploymentVersionService
Create a deployment version out of a deployment project and plan result. Automatic naming

Specified by:
createDeploymentVersion in interface DeploymentVersionService
Parameters:
deploymentProjectId - of project to create version for
planResultKey - of the result to pull artifacts from
Returns:
created Deployment Version
Throws:
WebValidationException

createDeploymentVersion

@NotNull
public DeploymentVersion createDeploymentVersion(long deploymentProjectId,
                                                         @NotNull
                                                         PlanResultKey planResultKey,
                                                         @Nullable
                                                         com.atlassian.user.User user,
                                                         @Nullable
                                                         String versionName,
                                                         @Nullable
                                                         String nextVersionName)
                                          throws WebValidationException
Description copied from interface: DeploymentVersionService
Create a deployment version with a specific name. From deployment project and plan result. Assumes validation of name has been done.

Specified by:
createDeploymentVersion in interface DeploymentVersionService
Parameters:
deploymentProjectId - project the version is getting created for
planResultKey - of the result to pull artifacts from
user - the person who is creating this version
versionName - name for the version to create
nextVersionName - the name for the next version (to be updated in version naming scheme)
Returns:
created Deployment Version.
Throws:
WebValidationException

getVersionNamePreview

public String getVersionNamePreview(ResultsSummary resultsSummary,
                                    String versionName)
Description copied from interface: DeploymentVersionService
Given a version name and a result summary, what would the version name look like after substitution. Does not check/mutate for uniqueness.

Specified by:
getVersionNamePreview in interface DeploymentVersionService
Parameters:
resultsSummary - the version would get created from
versionName - the potential name of the version
Returns:
substituted version name

resetVersionsAge

public void resetVersionsAge(@NotNull
                             DeploymentVersion deploymentVersion)
Description copied from interface: DeploymentVersionService
Resets version's age to 0.

Specified by:
resetVersionsAge in interface DeploymentVersionService

getPossibleVersionVariables

@NotNull
public Map<String,VariableDefinitionContext> getPossibleVersionVariables(@NotNull
                                                                                 ImmutablePlan linkedPlan,
                                                                                 boolean includeUndeterminable)
Description copied from interface: DeploymentVersionService
Provides a map of variables which might show up on a version.

Specified by:
getPossibleVersionVariables in interface DeploymentVersionService
Parameters:
linkedPlan - plan the deployment project is linked to
includeUndeterminable - if true include variables that we don't currently know the value, with a nice example (used for display purposes)
Returns:
a map of variables which might show up on a version.

getPossibleVersionVariables

@NotNull
public Map<String,VariableDefinitionContext> getPossibleVersionVariables(@NotNull
                                                                                 ImmutablePlan linkedPlan,
                                                                                 @Nullable
                                                                                 PlanResultKey planResultKey,
                                                                                 boolean includeUndeterminable)
Description copied from interface: DeploymentVersionService
Provides a map of variables which might show up on a version.

Specified by:
getPossibleVersionVariables in interface DeploymentVersionService
Parameters:
linkedPlan - plan the deployment project is linked to
planResultKey - resultKey for result variables context
includeUndeterminable - if true include variables that we don't currently know the value, with a nice example (used for display purposes)
Returns:
a map of variables which might show up on a version.

getDeploymentVersion

@Nullable
public DeploymentVersion getDeploymentVersion(long deploymentVersionId)
Description copied from interface: DeploymentVersionService
Get DeploymentVersion by id

Specified by:
getDeploymentVersion in interface DeploymentVersionService

getResultPlanKeysHavingDeploymentProjectVersions

@NotNull
public Set<String> getResultPlanKeysHavingDeploymentProjectVersions(long deploymentProjectId)
Description copied from interface: DeploymentVersionService
Returns keys of result plans (branch) that have at least one deployment project version (release)

Specified by:
getResultPlanKeysHavingDeploymentProjectVersions in interface DeploymentVersionService
Parameters:
deploymentProjectId - id of the deployment project
Returns:

getDeploymentProjectVersions

@NotNull
public List<DeploymentVersion> getDeploymentProjectVersions(long deploymentProjectId)
Description copied from interface: DeploymentVersionService
Retrieves the list of all the version for the deployment project, sorted by CreationDate (the most recent Deployment Versions will be returned as firsts)

Specified by:
getDeploymentProjectVersions in interface DeploymentVersionService
Parameters:
deploymentProjectId - id of the deployment project
Returns:
all the versions for the specified deployment project. Empty list if deployment project not found or if there is no versions for it.

getLatestVersionForProject

@Nullable
public DeploymentVersion getLatestVersionForProject(long deploymentProjectId)
Description copied from interface: DeploymentVersionService
Find the latest version for a deployment project regardless of branch used to create it. Comparison based on creation date.

Specified by:
getLatestVersionForProject in interface DeploymentVersionService
Parameters:
deploymentProjectId - of the deployment project
Returns:
the latest version for a deployment project

getLatestVersionForProject

@Nullable
public DeploymentVersion getLatestVersionForProject(long deploymentProjectId,
                                                             @NotNull
                                                             PlanKey branchKey)
Description copied from interface: DeploymentVersionService
Find the latest version for a deployment project. Comparison based on creation date.

Specified by:
getLatestVersionForProject in interface DeploymentVersionService
Parameters:
deploymentProjectId - of the deployment project
branchKey - key of the PlanBranch
Returns:
the latest version created for a branch for a deployment project

getDeploymentVersionByName

@Nullable
public DeploymentVersion getDeploymentVersionByName(@NotNull
                                                             String existingVersionName,
                                                             long deploymentProjectId)
Description copied from interface: DeploymentVersionService
Get a specific version by name

Specified by:
getDeploymentVersionByName in interface DeploymentVersionService
Parameters:
existingVersionName - name of the version
Returns:
the Deployment version with given name if found, otherwise null.

searchVersionsByName

@NotNull
public List<DeploymentVersion> searchVersionsByName(long deploymentProjectId,
                                                            @NotNull
                                                            String searchTerm)
Description copied from interface: DeploymentVersionService
Search for deployment versions in a project whose name contains the searchTerm, sorted by CreationDate (the most recent Deployment Versions will be returned as firsts)

Specified by:
searchVersionsByName in interface DeploymentVersionService
Parameters:
deploymentProjectId - deployment project to search within
searchTerm - term to look for.
Returns:
list of Deployment Versions matching the search criteria

searchVersionsByBranch

@NotNull
public List<DeploymentVersion> searchVersionsByBranch(long deploymentProjectId,
                                                              @NotNull
                                                              PlanKey branchKey)
Description copied from interface: DeploymentVersionService
Search for deployment versions in a project whose name contains the searchTerm, sorted by CreationDate (the most recent Deployment Versions will be returned as firsts)

Specified by:
searchVersionsByBranch in interface DeploymentVersionService
Parameters:
deploymentProjectId - deployment project to search within
branchKey - plan branch to narrow search result
Returns:
list of Deployment Versions matching the search criteria

searchVersionsByBranchAndName

@NotNull
public List<DeploymentVersion> searchVersionsByBranchAndName(long deploymentProjectId,
                                                                     @NotNull
                                                                     PlanKey branchKey,
                                                                     @NotNull
                                                                     String searchTerm)
Description copied from interface: DeploymentVersionService
Search for deployment versions in a project whose name contains the searchTerm, sorted by CreationDate (the most recent Deployment Versions will be returned as firsts)

Specified by:
searchVersionsByBranchAndName in interface DeploymentVersionService
Parameters:
deploymentProjectId - deployment project to search within
branchKey - plan branch to narrow search result
searchTerm - term to look for.
Returns:
list of Deployment Versions matching the search criteria

getVersionsCount

public int getVersionsCount()
Description copied from interface: DeploymentVersionService
Count all versions

Specified by:
getVersionsCount in interface DeploymentVersionService
Returns:
number of versions created in all deployment projects

getVersionsCountForProject

public int getVersionsCountForProject(long deploymentProjectId)
Description copied from interface: DeploymentVersionService
Count versions related to deployment project

Specified by:
getVersionsCountForProject in interface DeploymentVersionService
Parameters:
deploymentProjectId - id of deployment project
Returns:
number of versions created in deployment project

getRelatedPlanResultKeys

@NotNull
public Set<PlanResultKey> getRelatedPlanResultKeys(long deploymentVersionId)
Specified by:
getRelatedPlanResultKeys in interface DeploymentVersionService
Returns:
Retrieve the PlanResultKeys of ResultSummaries related to a particular DeploymentVersion

isFromTheSameBranch

public boolean isFromTheSameBranch(long firstVersionId,
                                   long secondVersionId)
Description copied from interface: DeploymentVersionService
Checks if both deployment versions come from the same branch

Specified by:
isFromTheSameBranch in interface DeploymentVersionService
Parameters:
firstVersionId - first deployment version
secondVersionId - second deployment version
Returns:

isFromTheSameBranch

public boolean isFromTheSameBranch(String planKey,
                                   long versionId)
Description copied from interface: DeploymentVersionService
Checks if the specified build result is on the same branch as the specified version ID

Specified by:
isFromTheSameBranch in interface DeploymentVersionService
Parameters:
planKey - the planKey of the build result you want to compare
versionId - the version ID of the version you want to compare
Returns:

getLatestVersionStatus

@Nullable
public DeploymentVersionStatus getLatestVersionStatus(long deploymentVersionId)
Specified by:
getLatestVersionStatus in interface DeploymentVersionService

updateVersionStatus

@NotNull
public DeploymentVersionStatus updateVersionStatus(long deploymentVersionId,
                                                           @NotNull
                                                           DeploymentVersionState status,
                                                           @NotNull
                                                           String userName)
Description copied from interface: DeploymentVersionService
Updates the version status for given deployment version.

Specified by:
updateVersionStatus in interface DeploymentVersionService

findVersionsBetween

@NotNull
public List<DeploymentVersion> findVersionsBetween(long deploymentProjectId,
                                                           @NotNull
                                                           DeploymentVersion version1,
                                                           @NotNull
                                                           DeploymentVersion version2)
Description copied from interface: DeploymentVersionService
Find versions created between version1 and version2. The versions must be different but belong to the same DeploymentProject The order of the argument is irrelevant: the method will determine which of the versions is the lower bound. Lower bound is not included in result but upper bound is. The result is sorted by creation date (newest first)

Specified by:
findVersionsBetween in interface DeploymentVersionService
Returns:

findPreviousVersion

@Nullable
public DeploymentVersion findPreviousVersion(long deploymentProjectId,
                                                      long versionId)
Specified by:
findPreviousVersion in interface DeploymentVersionService

getVersionArtifacts

@NotNull
public Map<String,Artifact> getVersionArtifacts(@NotNull
                                                        DeploymentVersion deploymentVersion)
Description copied from interface: DeploymentVersionService
Find all Artifact related to a version.

Specified by:
getVersionArtifacts in interface DeploymentVersionService
Returns:

getRelatedVersion

@Nullable
public DeploymentVersion getRelatedVersion(long deploymentProjectId,
                                                    @NotNull
                                                    PlanResultKey planResultKey)
Description copied from interface: DeploymentVersionService
Find latest version of a deployment project that is related to specific plan result.

Specified by:
getRelatedVersion in interface DeploymentVersionService
Returns:

findNextVersionContainingResult

public DeploymentVersion findNextVersionContainingResult(long deploymentProjectId,
                                                         @NotNull
                                                         PlanResultKey planResultKey)
Description copied from interface: DeploymentVersionService
Find the first version that is created from a result which is later than current result (not taking custom revision into account)

Specified by:
findNextVersionContainingResult in interface DeploymentVersionService
Returns:

getIncrementedVersionName

@NotNull
public String getIncrementedVersionName(@NotNull
                                                String versionName)
Description copied from interface: DeploymentVersionService
Calculates an increment of a version name. Increments last number in the name. If nothing found to increment will return passed in value.

Specified by:
getIncrementedVersionName in interface DeploymentVersionService
Parameters:
versionName - to increment
Returns:
incremented version name.

getEvaluatedVersionName

@NotNull
public String getEvaluatedVersionName(String nextVersionName,
                                              Map<String,VariableDefinitionContext> variables,
                                              Set<String> variablesToIncrement)
Specified by:
getEvaluatedVersionName in interface DeploymentVersionService
Returns:

updatePlanKey

public void updatePlanKey(@NotNull
                          PlanKey originalPlanKey,
                          @NotNull
                          PlanKey newPlanKey)
Description copied from interface: DeploymentVersionService
Update planKey in DeploymentVersion's related entities when plan key has changed (ie after moving plan)

Specified by:
updatePlanKey in interface DeploymentVersionService
Parameters:
originalPlanKey - original PlanKey
newPlanKey - new PlanKey

findVersionsAssociatedWithJiraIssue

@NotNull
public List<DeploymentVersion> findVersionsAssociatedWithJiraIssue(long deploymentProjectId,
                                                                           @NotNull
                                                                           String issueKey)
Description copied from interface: DeploymentVersionService
Find all the versions of a DeploymentProject that are associated with a JIRA issue

Specified by:
findVersionsAssociatedWithJiraIssue in interface DeploymentVersionService

findVersionsAssociatedWithJiraIssue

@NotNull
public com.google.common.collect.Multimap<DeploymentProject,DeploymentVersion> findVersionsAssociatedWithJiraIssue(@NotNull
                                                                                                                           String issueKey)
Description copied from interface: DeploymentVersionService
Find all the version that are associated with a JIRA issue, grouped by DeploymentProject

Specified by:
findVersionsAssociatedWithJiraIssue in interface DeploymentVersionService

findLatestKnownVersionsForEnvironmentsOfDeploymentProject

@NotNull
public Map<DeploymentVersion,Integer> findLatestKnownVersionsForEnvironmentsOfDeploymentProject(DeploymentProject deploymentProject)
Description copied from interface: DeploymentVersionService
Find all DeploymentVersion that are currently deployed on environments of a DeploymentProject For each version found give number of environments it is present on.

Specified by:
findLatestKnownVersionsForEnvironmentsOfDeploymentProject in interface DeploymentVersionService
Returns:

hasVersionsUnrelatedToBranch

public boolean hasVersionsUnrelatedToBranch(long deploymentProjectId,
                                            @NotNull
                                            PlanKey branchKey)
Description copied from interface: DeploymentVersionService
Test if there are DeploymentVersions in a DeploymentProject that are unrelated to given branch

Specified by:
hasVersionsUnrelatedToBranch in interface DeploymentVersionService
Parameters:
deploymentProjectId - identifies deployment project
branchKey - key of the branch
Returns:
true if there are versions in the project that are unrelated to branch


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