|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.deployments.versions.service.DeploymentVersionServiceImpl
public class DeploymentVersionServiceImpl
Constructor Summary | |
---|---|
DeploymentVersionServiceImpl(DeploymentProjectDao deploymentProjectDao,
DeploymentVersionDao deploymentVersionDao,
ResultsSummaryManager resultsSummaryManager,
DeploymentVersionChainResultDataCollector deploymentVersionChainResultDataCollector,
com.opensymphony.xwork.TextProvider textProvider,
DeploymentVersionVcsChangesetDao deploymentVersionVcsChangesetDao,
DeploymentVersionLinkedJiraIssueDao deploymentVersionLinkedJiraIssueDao,
VersionNamingService versionNamingService,
EnvironmentService environmentService,
BambooPermissionManager bambooPermissionManager,
GravatarService gravatarService,
BambooUserManager bambooUserService,
VariableDefinitionManager variableDefinitionManager,
VariableDefinitionFactory variableDefinitionFactory)
|
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,
java.lang.String versionName,
java.lang.String nextVersionName)
Create a deployment version with a specific name. |
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)
|
java.util.List<DeploymentVersion> |
findVersionsBetween(long deploymentProjectId,
DeploymentVersion version1,
DeploymentVersion version2)
Find versions created between version1 and version2. |
java.util.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(java.lang.String existingVersionName,
long deploymentProjectId)
Get a specific version by name |
java.lang.String |
getIncrementedVersionName(java.lang.String versionName)
Calculates an increment of a version name. |
DeploymentVersion |
getLatestVersionForProject(long id)
Find the latest version for a deployment project. |
DeploymentVersionStatus |
getLatestVersionStatus(long deploymentVersionId)
|
java.util.Map<java.lang.String,VariableDefinitionContext> |
getPossibleVersionVariables(ImmutablePlan linkedPlan,
boolean includeUndeterminable)
Provides a map of variables which might show up on a version. |
java.util.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. |
java.util.Map<java.lang.String,Artifact> |
getVersionArtifacts(DeploymentVersion deploymentVersion)
Find all Artifact related to a version. |
int |
getVersionsCountForProject(long deploymentProjectId)
|
DeploymentVersion |
renameVersion(long deploymentProjectId,
DeploymentVersion deploymentVersion,
java.lang.String newVersionName)
Rename a version. |
java.util.List<DeploymentVersion> |
searchVersionsByName(long deploymentProjectId,
java.lang.String searchTerm)
Search for deployment versions in a project whose name contains the searchTerm |
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,
java.lang.String userName)
|
ErrorCollection |
validateCreateDeploymentVersion(long deploymentProjectId,
PlanResultKey planResultKey,
java.lang.String name,
java.lang.String nextVersionName)
Validates values to be used for creating a new version. |
ErrorCollection |
validateDeploymentVersionRename(long deploymentProjectId,
DeploymentVersion deploymentVersion,
java.lang.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 |
---|
public DeploymentVersionServiceImpl(@NotNull DeploymentProjectDao deploymentProjectDao, @NotNull DeploymentVersionDao deploymentVersionDao, @NotNull ResultsSummaryManager resultsSummaryManager, @NotNull DeploymentVersionChainResultDataCollector deploymentVersionChainResultDataCollector, @NotNull com.opensymphony.xwork.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)
Method Detail |
---|
@NotNull public ErrorCollection validateDeploymentVersionRename(long deploymentProjectId, @NotNull DeploymentVersion deploymentVersion, @Nullable java.lang.String name)
DeploymentVersionService
validateDeploymentVersionRename
in interface DeploymentVersionService
@NotNull public DeploymentVersion renameVersion(long deploymentProjectId, @NotNull DeploymentVersion deploymentVersion, @NotNull java.lang.String newVersionName) throws WebValidationException
DeploymentVersionService
renameVersion
in interface DeploymentVersionService
WebValidationException
@NotNull public ErrorCollection validateCreateDeploymentVersion(long deploymentProjectId, @NotNull PlanResultKey planResultKey, @Nullable java.lang.String name, @Nullable java.lang.String nextVersionName)
DeploymentVersionService
validateCreateDeploymentVersion
in interface DeploymentVersionService
@NotNull public DeploymentVersion createDeploymentVersion(long deploymentProjectId, @NotNull PlanResultKey planResultKey) throws WebValidationException
DeploymentVersionService
createDeploymentVersion
in interface DeploymentVersionService
deploymentProjectId
- of project to create version forplanResultKey
- of the result to pull artifacts from
WebValidationException
@NotNull public DeploymentVersion createDeploymentVersion(long deploymentProjectId, @NotNull PlanResultKey planResultKey, @Nullable com.atlassian.user.User user, @Nullable java.lang.String versionName, @Nullable java.lang.String nextVersionName) throws WebValidationException
DeploymentVersionService
createDeploymentVersion
in interface DeploymentVersionService
deploymentProjectId
- 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 udpated in version naming scheme)
WebValidationException
@NotNull public java.util.Map<java.lang.String,VariableDefinitionContext> getPossibleVersionVariables(@NotNull ImmutablePlan linkedPlan, boolean includeUndeterminable)
DeploymentVersionService
getPossibleVersionVariables
in interface DeploymentVersionService
linkedPlan
- 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)
@Nullable public DeploymentVersion getDeploymentVersion(long deploymentVersionId)
DeploymentVersionService
getDeploymentVersion
in interface DeploymentVersionService
@NotNull public java.util.List<DeploymentVersion> getDeploymentProjectVersions(long deploymentProjectId)
DeploymentVersionService
getDeploymentProjectVersions
in interface DeploymentVersionService
deploymentProjectId
- if of the deployment project
public DeploymentVersion getLatestVersionForProject(long id)
DeploymentVersionService
getLatestVersionForProject
in interface DeploymentVersionService
id
- of the deployment project
@Nullable public DeploymentVersion getDeploymentVersionByName(@NotNull java.lang.String existingVersionName, long deploymentProjectId)
DeploymentVersionService
getDeploymentVersionByName
in interface DeploymentVersionService
existingVersionName
- name of the version
@NotNull public java.util.List<DeploymentVersion> searchVersionsByName(long deploymentProjectId, @NotNull java.lang.String searchTerm)
DeploymentVersionService
searchVersionsByName
in interface DeploymentVersionService
deploymentProjectId
- deployment project to search withinsearchTerm
- term to look for.
public int getVersionsCountForProject(long deploymentProjectId)
getVersionsCountForProject
in interface DeploymentVersionService
@NotNull public java.util.Set<PlanResultKey> getRelatedPlanResultKeys(long deploymentVersionId)
getRelatedPlanResultKeys
in interface DeploymentVersionService
@Nullable public DeploymentVersionStatus getLatestVersionStatus(long deploymentVersionId)
getLatestVersionStatus
in interface DeploymentVersionService
@Nullable public DeploymentVersionStatus updateVersionStatus(long deploymentVersionId, @NotNull DeploymentVersionState status, @NotNull java.lang.String userName)
updateVersionStatus
in interface DeploymentVersionService
@NotNull public java.util.List<DeploymentVersion> findVersionsBetween(long deploymentProjectId, @NotNull DeploymentVersion version1, @NotNull DeploymentVersion version2)
DeploymentVersionService
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)
findVersionsBetween
in interface DeploymentVersionService
@Nullable public DeploymentVersion findPreviousVersion(long deploymentProjectId, @NotNull long versionId)
findPreviousVersion
in interface DeploymentVersionService
@NotNull public java.util.Map<java.lang.String,Artifact> getVersionArtifacts(@NotNull DeploymentVersion deploymentVersion)
DeploymentVersionService
Artifact
related to a version.
getVersionArtifacts
in interface DeploymentVersionService
@Nullable public DeploymentVersion getRelatedVersion(long deploymentProjectId, PlanResultKey planResultKey)
DeploymentVersionService
getRelatedVersion
in interface DeploymentVersionService
public DeploymentVersion findNextVersionContainingResult(long deploymentProjectId, @NotNull PlanResultKey planResultKey)
DeploymentVersionService
findNextVersionContainingResult
in interface DeploymentVersionService
@NotNull public java.lang.String getIncrementedVersionName(@NotNull java.lang.String versionName)
DeploymentVersionService
getIncrementedVersionName
in interface DeploymentVersionService
versionName
- to increment
public void updatePlanKey(@NotNull PlanKey originalPlanKey, @NotNull PlanKey newPlanKey)
DeploymentVersionService
updatePlanKey
in interface DeploymentVersionService
originalPlanKey
- original PlanKeynewPlanKey
- new PlanKey
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |