public class DeploymentVersionServiceImpl extends Object implements DeploymentVersionService, DeploymentVersionDtoManager
| Constructor and Description |
|---|
DeploymentVersionServiceImpl(@NotNull DeploymentProjectDao deploymentProjectDao,
@NotNull DeploymentVersionDao deploymentVersionDao,
@NotNull ResultsSummaryManager resultsSummaryManager,
@NotNull DeploymentVersionChainResultDataCollector deploymentVersionChainResultDataCollector,
@NotNull com.opensymphony.xwork2.TextProvider textProvider,
@NotNull EnvironmentService environmentService,
@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,
@NotNull RepositoryDefinitionManager repositoryDefinitionManager,
@NotNull VcsRepositoryManager vcsRepositoryManager,
@NotNull BambooCachingPermissionManagerFacadeFactory bambooCachingPermissionManagerFacadeFactory,
@NotNull ArtifactLinkManager artifactLinkManager) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull DeploymentVersion |
createDeploymentVersion(long deploymentProjectId,
@NotNull PlanResultKey planResultKey)
Create a deployment version out of a deployment project and plan result.
|
@NotNull DeploymentVersion |
createDeploymentVersion(long deploymentProjectId,
@NotNull PlanResultKey planResultKey,
@Nullable com.atlassian.user.User user,
@Nullable String versionName,
@Nullable String nextVersionName)
Create a deployment version with a specific name.
|
@NotNull 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,
@NotNull PlanResultKey planResultKey)
Find the first version that is created from a result which is later than current result (not taking custom revision into account)
|
@Nullable DeploymentVersion |
findPreviousVersion(long deploymentProjectId,
long versionId) |
@NotNull List<DeploymentVersion> |
findVersionsAssociatedWithJiraIssue(long deploymentProjectId,
@NotNull String issueKey)
Find all the versions of a
DeploymentProject that are associated with a JIRA issue |
@NotNull com.google.common.collect.Multimap<DeploymentProject,DeploymentVersion> |
findVersionsAssociatedWithJiraIssue(@NotNull String issueKey)
Find all the version that are associated with a JIRA issue, grouped by
DeploymentProject |
@NotNull List<DeploymentVersion> |
findVersionsBetween(long deploymentProjectId,
@NotNull DeploymentVersion version1,
@NotNull DeploymentVersion version2)
Find versions created between version1 and version2.
|
@NotNull List<DeploymentVersion> |
findVersionsBetweenNoVariables(@NotNull long deploymentProjectId,
@NotNull DeploymentVersion version1,
@NotNull DeploymentVersion version2)
Find versions created between version1 and version2.
|
@NotNull 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)
|
@NotNull List<DeploymentVersion> |
getDeploymentProjectVersionsNoVariables(@NotNull DeploymentProject deploymentProject)
Retrieves the list of all the version for the deployment project, sorted by CreationDate (the most recent
Deployment Versions will be returned as firsts)
|
@NotNull List<DeploymentVersion> |
getDeploymentProjectVersionsNoVariables(@NotNull DeploymentProject deploymentProject,
int offset,
int maxResults)
Retrieves the list of the version for the deployment project, sorted by CreationDate (the most recent
Deployment Versions will be returned as firsts).
|
@Nullable DeploymentVersion |
getDeploymentVersion(@Nullable DeploymentVersionDto dto,
@Nullable DeploymentProject project)
Convert a DeploymentVersionDto to a
DeploymentVersion. |
@Nullable DeploymentVersion |
getDeploymentVersion(long deploymentVersionId)
Get DeploymentVersion by id
|
@Nullable DeploymentVersion |
getDeploymentVersionByName(@NotNull String existingVersionName,
long deploymentProjectId)
Get a specific version by name
|
@NotNull String |
getEvaluatedVersionName(String nextVersionName,
Map<String,VariableDefinitionContext> variables,
Set<String> variablesToIncrement) |
@NotNull String |
getIncrementedVersionName(@NotNull String versionName)
Calculates an increment of a version name.
|
@Nullable DeploymentVersion |
getLatestVersionForProject(long deploymentProjectId)
Find the latest version for a deployment project regardless of branch used to create it.
|
@Nullable DeploymentVersion |
getLatestVersionForProject(long deploymentProjectId,
@NotNull PlanKey branchKey)
Find the latest version for a deployment project.
|
@Nullable DeploymentVersionStatus |
getLatestVersionStatus(long deploymentVersionId) |
@NotNull Map<Long,DeploymentVersionStatus> |
getLatestVersionStatuses(@NotNull List<Long> deploymentVersionIds)
Find a latest version status for each version id.
|
@NotNull DeploymentVersion |
getOrCreateDeploymentVersion(long deploymentProjectId,
@NotNull PlanResultKey planResultKey)
Given a build result, find a deployment version that matches it, or create it if it doesn't exist.
|
@NotNull Map<String,VariableDefinitionContext> |
getPossibleVersionVariables(@NotNull ImmutablePlan linkedPlan,
boolean includeUndeterminable)
Provides a map of variables which might show up on a version.
|
@NotNull Map<String,VariableDefinitionContext> |
getPossibleVersionVariables(@NotNull ImmutablePlan linkedPlan,
@Nullable PlanResultKey planResultKey,
boolean includeUndeterminable)
Provides a map of variables which might show up on a version.
|
@NotNull Set<PlanResultKey> |
getRelatedPlanResultKeys(long deploymentVersionId) |
@Nullable DeploymentVersion |
getRelatedVersion(long deploymentProjectId,
@NotNull PlanResultKey planResultKey)
Find latest version of a deployment project that is related to specific plan result.
|
@NotNull Set<String> |
getResultPlanKeysHavingDeploymentProjectVersions(long deploymentProjectId)
Returns keys of result plans (branch) that have at least one deployment project version (release)
|
@NotNull com.google.common.collect.ImmutableList<VariableSubstitutionContext> |
getVariableContextForVersion(@NotNull long deploymentVersionId)
Fetch variable context associated with a version.
|
@NotNull com.google.common.collect.Multimap<String,Artifact> |
getVersionArtifacts(@NotNull 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
|
int |
getVersionsCountForProjectAndBranch(@NotNull long deploymentProjectId,
@NotNull PlanKey branchKey)
Count versions related to deployment project and a specified plan branch
|
boolean |
hasVersionsUnrelatedToBranch(long deploymentProjectId,
@NotNull 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,
@NotNull String name)
Check whether the version name is already being used by another version within this project
|
@NotNull DeploymentVersion |
renameVersion(long deploymentProjectId,
@NotNull DeploymentVersion deploymentVersion,
@NotNull String newVersionName)
Rename a version.
|
void |
resetVersionsAge(@NotNull DeploymentVersion deploymentVersion)
Resets version's age to 0.
|
@NotNull List<DeploymentVersion> |
searchVersionsByBranch(long deploymentProjectId,
@NotNull PlanKey branchKey)
Search for deployment versions in a project associated with a specific branch, sorted by CreationDate (the most recent
Deployment Versions will be returned as firsts)
|
@NotNull List<DeploymentVersion> |
searchVersionsByBranchAndName(long deploymentProjectId,
@NotNull PlanKey branchKey,
@NotNull 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)
|
@NotNull List<DeploymentVersion> |
searchVersionsByBranchAndNameNoVariables(@NotNull DeploymentProject deploymentProject,
@NotNull PlanKey branchKey,
@NotNull String searchTerm)
Search for deployment versions in a project whose name contains the searchTerm and associated with a specific branch, sorted by CreationDate (the most recent
Deployment Versions will be returned as firsts)
|
@NotNull List<DeploymentVersion> |
searchVersionsByBranchNoVariables(@NotNull DeploymentProject deploymentProject,
@NotNull PlanKey branchKey)
Search for deployment versions in a project associated with a specific branch, sorted by CreationDate (the most recent
Deployment Versions will be returned as firsts)
|
@NotNull List<DeploymentVersion> |
searchVersionsByBranchNoVariables(@NotNull DeploymentProject deploymentProject,
@NotNull PlanKey branchKey,
int startIndex,
int maxResults)
Search for deployment versions in a project associated with a specific branch, sorted by CreationDate (the most recent
Deployment Versions will be returned as firsts)
|
@NotNull List<DeploymentVersion> |
searchVersionsByName(long deploymentProjectId,
@NotNull 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)
|
@NotNull List<DeploymentVersion> |
searchVersionsByNameNoVariables(@NotNull DeploymentProject deploymentProject,
@NotNull 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(@NotNull PlanKey originalPlanKey,
@NotNull PlanKey newPlanKey)
Update planKey in DeploymentVersion's related entities when plan key has changed (ie after moving plan)
|
void |
updateVersionsForResult(@NotNull PlanResultKey planResultKey)
Update related versions data (artifacts and variables) after a chain stage has been completed.
|
@NotNull DeploymentVersionStatus |
updateVersionStatus(long deploymentVersionId,
@NotNull DeploymentVersionState status,
@NotNull String userName)
Updates the version status for given deployment version.
|
@NotNull ErrorCollection |
validateCreateDeploymentVersion(long deploymentProjectId,
@NotNull PlanResultKey planResultKey,
@Nullable String name,
@Nullable String nextVersionName)
Validates values to be used for creating a new version.
|
@NotNull ErrorCollection |
validateDeploymentVersionRename(long deploymentProjectId,
@NotNull DeploymentVersion deploymentVersion,
@Nullable String name)
Validates values to be used for renaming version.
|
public DeploymentVersionServiceImpl(@NotNull
@NotNull DeploymentProjectDao deploymentProjectDao,
@NotNull
@NotNull DeploymentVersionDao deploymentVersionDao,
@NotNull
@NotNull ResultsSummaryManager resultsSummaryManager,
@NotNull
@NotNull DeploymentVersionChainResultDataCollector deploymentVersionChainResultDataCollector,
@NotNull
@NotNull com.opensymphony.xwork2.TextProvider textProvider,
@NotNull
@NotNull EnvironmentService environmentService,
@NotNull
@NotNull GravatarService gravatarService,
@NotNull
@NotNull BambooUserManager bambooUserService,
@NotNull
@NotNull VariableDefinitionManager variableDefinitionManager,
@NotNull
@NotNull VariableDefinitionFactory variableDefinitionFactory,
@NotNull
@NotNull CustomVariableContext customVariableContext,
@NotNull
@NotNull com.atlassian.event.api.EventPublisher eventPublisher,
@NotNull
@NotNull CachedPlanManager cachedPlanManager,
@NotNull
@NotNull ScopedExclusionService scopedExclusionService,
@NotNull
@NotNull ResultsSummaryVariableAccessor resultsSummaryVariableAccessor,
@NotNull
@NotNull RepositoryDefinitionManager repositoryDefinitionManager,
@NotNull
@NotNull VcsRepositoryManager vcsRepositoryManager,
@NotNull
@NotNull BambooCachingPermissionManagerFacadeFactory bambooCachingPermissionManagerFacadeFactory,
@NotNull
@NotNull ArtifactLinkManager artifactLinkManager)
@NotNull public @NotNull ErrorCollection validateDeploymentVersionRename(long deploymentProjectId, @NotNull @NotNull DeploymentVersion deploymentVersion, @Nullable @Nullable String name)
DeploymentVersionServicevalidateDeploymentVersionRename in interface DeploymentVersionService@NotNull public @NotNull DeploymentVersion renameVersion(long deploymentProjectId, @NotNull @NotNull DeploymentVersion deploymentVersion, @NotNull @NotNull String newVersionName) throws WebValidationException
DeploymentVersionServicerenameVersion in interface DeploymentVersionServiceWebValidationException@NotNull public @NotNull ErrorCollection validateCreateDeploymentVersion(long deploymentProjectId, @NotNull @NotNull PlanResultKey planResultKey, @Nullable @Nullable String name, @Nullable @Nullable String nextVersionName)
DeploymentVersionServicevalidateCreateDeploymentVersion in interface DeploymentVersionServicedeploymentProjectId - id of the deployment projectplanResultKey - key of the build result on which this version is createdname - version namenextVersionName - name of the next versionpublic boolean isVersionNameConflicting(long deploymentProjectId,
@NotNull
@NotNull String name)
DeploymentVersionServiceisVersionNameConflicting in interface DeploymentVersionServicedeploymentProjectId - project to filter byname - to check@NotNull public @NotNull DeploymentVersion getOrCreateDeploymentVersion(long deploymentProjectId, @NotNull @NotNull PlanResultKey planResultKey) throws WebValidationException
DeploymentVersionServicegetOrCreateDeploymentVersion in interface DeploymentVersionServicedeploymentProjectId - of project to create version forplanResultKey - of the result to pull artifacts fromWebValidationExceptionpublic void updateVersionsForResult(@NotNull
@NotNull PlanResultKey planResultKey)
DeploymentVersionServiceupdateVersionsForResult in interface DeploymentVersionService@NotNull public @NotNull DeploymentVersion createDeploymentVersion(long deploymentProjectId, @NotNull @NotNull PlanResultKey planResultKey) throws WebValidationException
DeploymentVersionServicecreateDeploymentVersion in interface DeploymentVersionServicedeploymentProjectId - of project to create version forplanResultKey - of the result to pull artifacts fromWebValidationException@NotNull public @NotNull DeploymentVersion createDeploymentVersion(long deploymentProjectId, @NotNull @NotNull PlanResultKey planResultKey, @Nullable @Nullable com.atlassian.user.User user, @Nullable @Nullable String versionName, @Nullable @Nullable String nextVersionName) throws WebValidationException
DeploymentVersionServicecreateDeploymentVersion in interface DeploymentVersionServicedeploymentProjectId - project the version is getting created forplanResultKey - of the result to pull artifacts fromuser - the person who is creating this versionversionName - name for the version to createnextVersionName - the name for the next version (to be updated in version naming scheme)WebValidationException@NotNull public @NotNull com.google.common.collect.ImmutableList<VariableSubstitutionContext> getVariableContextForVersion(@NotNull @NotNull long deploymentVersionId)
DeploymentVersionServicegetVariableContextForVersion in interface DeploymentVersionServicepublic String getVersionNamePreview(ResultsSummary resultsSummary, String versionName)
DeploymentVersionServicegetVersionNamePreview in interface DeploymentVersionServiceresultsSummary - the version would get created fromversionName - the potential name of the versionpublic void resetVersionsAge(@NotNull
@NotNull DeploymentVersion deploymentVersion)
DeploymentVersionServiceresetVersionsAge in interface DeploymentVersionService@NotNull public @NotNull Map<String,VariableDefinitionContext> getPossibleVersionVariables(@NotNull @NotNull ImmutablePlan linkedPlan, boolean includeUndeterminable)
DeploymentVersionServicegetPossibleVersionVariables in interface DeploymentVersionServicelinkedPlan - plan the deployment project is linked toincludeUndeterminable - if true include variables that we don't currently know the value, with a nice example (used for display purposes)@NotNull public @NotNull Map<String,VariableDefinitionContext> getPossibleVersionVariables(@NotNull @NotNull ImmutablePlan linkedPlan, @Nullable @Nullable PlanResultKey planResultKey, boolean includeUndeterminable)
DeploymentVersionServicegetPossibleVersionVariables in interface DeploymentVersionServicelinkedPlan - plan the deployment project is linked toplanResultKey - resultKey for result variables contextincludeUndeterminable - if true include variables that we don't currently know the value, with a nice example (used for display purposes)@Nullable public @Nullable DeploymentVersion getDeploymentVersion(long deploymentVersionId)
DeploymentVersionServicegetDeploymentVersion in interface DeploymentVersionService@Nullable @Internal public @Nullable DeploymentVersion getDeploymentVersion(@Nullable @Nullable DeploymentVersionDto dto, @Nullable @Nullable DeploymentProject project) throws org.acegisecurity.AccessDeniedException
DeploymentVersionDtoManagerDeploymentVersion.getDeploymentVersion in interface DeploymentVersionDtoManagerorg.acegisecurity.AccessDeniedException - if the DeploymentVersion is inaccessible to the current user, but also
marks the current transaction as rollback-only@NotNull public @NotNull Set<String> getResultPlanKeysHavingDeploymentProjectVersions(long deploymentProjectId)
DeploymentVersionServicegetResultPlanKeysHavingDeploymentProjectVersions in interface DeploymentVersionServicedeploymentProjectId - id of the deployment project@NotNull public @NotNull List<DeploymentVersion> getDeploymentProjectVersions(long deploymentProjectId)
DeploymentVersionService
This method fetches complete version data, DeploymentVersionService.getDeploymentProjectVersionsNoVariables(DeploymentProject)
should be preferred when variable data is not required, e.g. for displaying list of version in the UI.
getDeploymentProjectVersions in interface DeploymentVersionServicedeploymentProjectId - id of the deployment project@NotNull public @NotNull List<DeploymentVersion> getDeploymentProjectVersionsNoVariables(@NotNull @NotNull DeploymentProject deploymentProject)
DeploymentVersionServicegetDeploymentProjectVersionsNoVariables in interface DeploymentVersionServicedeploymentProject - deployment project@NotNull public @NotNull List<DeploymentVersion> getDeploymentProjectVersionsNoVariables(@NotNull @NotNull DeploymentProject deploymentProject, int offset, int maxResults)
DeploymentVersionServicegetDeploymentProjectVersionsNoVariables in interface DeploymentVersionServicedeploymentProject - deployment projectoffset - number of results to skipmaxResults - maximum length of the returned list@Nullable public @Nullable DeploymentVersion getLatestVersionForProject(long deploymentProjectId)
DeploymentVersionServicegetLatestVersionForProject in interface DeploymentVersionServicedeploymentProjectId - of the deployment project@Nullable public @Nullable DeploymentVersion getLatestVersionForProject(long deploymentProjectId, @NotNull @NotNull PlanKey branchKey)
DeploymentVersionServicegetLatestVersionForProject in interface DeploymentVersionServicedeploymentProjectId - of the deployment projectbranchKey - key of the PlanBranch@Nullable public @Nullable DeploymentVersion getDeploymentVersionByName(@NotNull @NotNull String existingVersionName, long deploymentProjectId)
DeploymentVersionServicegetDeploymentVersionByName in interface DeploymentVersionServiceexistingVersionName - name of the version@NotNull public @NotNull List<DeploymentVersion> searchVersionsByName(long deploymentProjectId, @NotNull @NotNull String searchTerm)
DeploymentVersionService
This method fetches complete version data, DeploymentVersionService.searchVersionsByNameNoVariables(DeploymentProject, String)
should be preferred when variable data is not required, e.g. for displaying list of version in the UI.
searchVersionsByName in interface DeploymentVersionServicedeploymentProjectId - deployment project to search withinsearchTerm - term to look for.@NotNull public @NotNull List<DeploymentVersion> searchVersionsByBranch(long deploymentProjectId, @NotNull @NotNull PlanKey branchKey)
DeploymentVersionService
This method fetches complete version data, DeploymentVersionService.searchVersionsByBranchNoVariables(DeploymentProject, PlanKey)
should be preferred when variable data is not required, e.g. for displaying list of version in the UI.
searchVersionsByBranch in interface DeploymentVersionServicedeploymentProjectId - deployment project to search withinbranchKey - plan branch to narrow search result@NotNull public @NotNull List<DeploymentVersion> searchVersionsByBranchAndName(long deploymentProjectId, @NotNull @NotNull PlanKey branchKey, @NotNull @NotNull String searchTerm)
DeploymentVersionService
This method fetches complete version data, DeploymentVersionService.searchVersionsByBranchAndNameNoVariables(DeploymentProject, PlanKey, String)
should be preferred when variable data is not required, e.g. for displaying list of version in the UI.
searchVersionsByBranchAndName in interface DeploymentVersionServicedeploymentProjectId - deployment project to search withinbranchKey - plan branch to narrow search resultsearchTerm - term to look for.@NotNull public @NotNull List<DeploymentVersion> searchVersionsByNameNoVariables(@NotNull @NotNull DeploymentProject deploymentProject, @NotNull @NotNull String searchTerm)
DeploymentVersionServicesearchVersionsByNameNoVariables in interface DeploymentVersionServicedeploymentProject - deployment project to search withinsearchTerm - term to look for.@NotNull public @NotNull List<DeploymentVersion> searchVersionsByBranchNoVariables(@NotNull @NotNull DeploymentProject deploymentProject, @NotNull @NotNull PlanKey branchKey)
DeploymentVersionServicesearchVersionsByBranchNoVariables in interface DeploymentVersionServicedeploymentProject - deployment project to search withinbranchKey - plan branch to narrow search result@NotNull public @NotNull List<DeploymentVersion> searchVersionsByBranchNoVariables(@NotNull @NotNull DeploymentProject deploymentProject, @NotNull @NotNull PlanKey branchKey, int startIndex, int maxResults)
DeploymentVersionServicesearchVersionsByBranchNoVariables in interface DeploymentVersionServicedeploymentProject - deployment project to search withinbranchKey - plan branch to narrow search result@NotNull public @NotNull List<DeploymentVersion> searchVersionsByBranchAndNameNoVariables(@NotNull @NotNull DeploymentProject deploymentProject, @NotNull @NotNull PlanKey branchKey, @NotNull @NotNull String searchTerm)
DeploymentVersionServicesearchVersionsByBranchAndNameNoVariables in interface DeploymentVersionServicedeploymentProject - deployment project to search withinbranchKey - plan branch to narrow search resultsearchTerm - term to look for.public int getVersionsCount()
DeploymentVersionServicegetVersionsCount in interface DeploymentVersionServicepublic int getVersionsCountForProject(long deploymentProjectId)
DeploymentVersionServicegetVersionsCountForProject in interface DeploymentVersionServicedeploymentProjectId - id of deployment projectpublic int getVersionsCountForProjectAndBranch(@NotNull
@NotNull long deploymentProjectId,
@NotNull
@NotNull PlanKey branchKey)
DeploymentVersionServicegetVersionsCountForProjectAndBranch in interface DeploymentVersionServicedeploymentProjectId - id of deployment projectbranchKey - plan branch key@NotNull public @NotNull Set<PlanResultKey> getRelatedPlanResultKeys(long deploymentVersionId)
getRelatedPlanResultKeys in interface DeploymentVersionServicepublic boolean isFromTheSameBranch(long firstVersionId,
long secondVersionId)
DeploymentVersionServiceisFromTheSameBranch in interface DeploymentVersionServicefirstVersionId - first deployment versionsecondVersionId - second deployment versionpublic boolean isFromTheSameBranch(String planKey, long versionId)
DeploymentVersionServiceisFromTheSameBranch in interface DeploymentVersionServiceplanKey - the planKey of the build result you want to compareversionId - the version ID of the version you want to compare@Nullable public @Nullable DeploymentVersionStatus getLatestVersionStatus(long deploymentVersionId)
getLatestVersionStatus in interface DeploymentVersionService@NotNull public @NotNull Map<Long,DeploymentVersionStatus> getLatestVersionStatuses(@NotNull @NotNull List<Long> deploymentVersionIds)
DeploymentVersionServicegetLatestVersionStatuses in interface DeploymentVersionService@NotNull public @NotNull DeploymentVersionStatus updateVersionStatus(long deploymentVersionId, @NotNull @NotNull DeploymentVersionState status, @NotNull @NotNull String userName)
DeploymentVersionServiceupdateVersionStatus in interface DeploymentVersionService@NotNull public @NotNull List<DeploymentVersion> findVersionsBetween(long deploymentProjectId, @NotNull @NotNull DeploymentVersion version1, @NotNull @NotNull DeploymentVersion version2)
DeploymentVersionServiceDeploymentProject
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)findVersionsBetween in interface DeploymentVersionService@NotNull public @NotNull List<DeploymentVersion> findVersionsBetweenNoVariables(@NotNull @NotNull long deploymentProjectId, @NotNull @NotNull DeploymentVersion version1, @NotNull @NotNull DeploymentVersion version2)
DeploymentVersionServiceDeploymentProject
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)findVersionsBetweenNoVariables in interface DeploymentVersionService@Nullable public @Nullable DeploymentVersion findPreviousVersion(long deploymentProjectId, long versionId)
findPreviousVersion in interface DeploymentVersionService@NotNull public @NotNull com.google.common.collect.Multimap<String,Artifact> getVersionArtifacts(@NotNull @NotNull DeploymentVersion deploymentVersion)
DeploymentVersionServiceArtifact related to a version.getVersionArtifacts in interface DeploymentVersionService@Nullable public @Nullable DeploymentVersion getRelatedVersion(long deploymentProjectId, @NotNull @NotNull PlanResultKey planResultKey)
DeploymentVersionServicegetRelatedVersion in interface DeploymentVersionServicepublic DeploymentVersion findNextVersionContainingResult(long deploymentProjectId, @NotNull @NotNull PlanResultKey planResultKey)
DeploymentVersionServicefindNextVersionContainingResult in interface DeploymentVersionService@NotNull public @NotNull String getIncrementedVersionName(@NotNull @NotNull String versionName)
DeploymentVersionServicegetIncrementedVersionName in interface DeploymentVersionServiceversionName - to increment@NotNull public @NotNull String getEvaluatedVersionName(String nextVersionName, Map<String,VariableDefinitionContext> variables, Set<String> variablesToIncrement)
getEvaluatedVersionName in interface DeploymentVersionServicepublic void updatePlanKey(@NotNull
@NotNull PlanKey originalPlanKey,
@NotNull
@NotNull PlanKey newPlanKey)
DeploymentVersionServiceupdatePlanKey in interface DeploymentVersionServiceoriginalPlanKey - original PlanKeynewPlanKey - new PlanKey@NotNull public @NotNull List<DeploymentVersion> findVersionsAssociatedWithJiraIssue(long deploymentProjectId, @NotNull @NotNull String issueKey)
DeploymentVersionServiceDeploymentProject that are associated with a JIRA issuefindVersionsAssociatedWithJiraIssue in interface DeploymentVersionService@NotNull public @NotNull com.google.common.collect.Multimap<DeploymentProject,DeploymentVersion> findVersionsAssociatedWithJiraIssue(@NotNull @NotNull String issueKey)
DeploymentVersionServiceDeploymentProjectfindVersionsAssociatedWithJiraIssue in interface DeploymentVersionService@NotNull public @NotNull Map<DeploymentVersion,Integer> findLatestKnownVersionsForEnvironmentsOfDeploymentProject(DeploymentProject deploymentProject)
DeploymentVersionServiceDeploymentVersion that are currently deployed on environments of a DeploymentProject
For each version found give number of environments it is present on.findLatestKnownVersionsForEnvironmentsOfDeploymentProject in interface DeploymentVersionServicepublic boolean hasVersionsUnrelatedToBranch(long deploymentProjectId,
@NotNull
@NotNull PlanKey branchKey)
DeploymentVersionServiceDeploymentVersions in a DeploymentProject that are unrelated to given branchhasVersionsUnrelatedToBranch in interface DeploymentVersionServicedeploymentProjectId - identifies deployment projectbranchKey - key of the branchCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.