Interface DeploymentProjectDao
- All Known Implementing Classes:
DeploymentProjectDaoImpl
@Internal
public interface DeploymentProjectDao
-
Method Summary
Modifier and TypeMethodDescriptionlong
@NotNull MutableDeploymentProject
@NotNull MutableVersionNamingScheme
void
delete
(MutableDeploymentProjectItem deploymentProjectItem) Delete DeploymentProjectItemvoid
delete
(MutableDeploymentProject deploymentProject) Delete DeploymentProject and related DeploymentProjectItemsvoid
delete
(MutableVersionNamingScheme versionNamingScheme) Delete the version naming Schemeboolean
doesArtifactProjectItemExist
(long deploymentProjectId, long artifactId) Check for existence of DeploymentProjectItem by DB id of the DeploymentProject and ArtifactDefinitionfindAllByIds
(Collection<Long> deploymentsIds) Returns a list of Deployment Projects which id values are in the deploymentsIds collection@Nullable MutableDeploymentProject
@Nullable MutableDeploymentProject
@NotNull Collection<Long>
@NotNull List<MutableDeploymentProject>
findDeploymentProjectsRelatedToArtifact
(long artifactId) @NotNull List<MutableDeploymentProject>
@NotNull List<MutableDeploymentProject>
getAllDeploymentProjects
(int firstResult, int maxResults) @Nullable MutableDeploymentProjectItem
getArtifactProjectItem
(long deploymentProjectId, long artifactId) Get DeploymentProjectItem by DB id of the DeploymentProject and ArtifactDefinition@Nullable MutableDeploymentProject
getDeploymentProject
(long deploymentProjectId) Get DeploymentProject by DB id@Nullable MutableDeploymentProject
getDeploymentProject
(@NotNull DeploymentKey key) Get DeploymentProject by keyint
@Nullable MutableDeploymentProject
getDeploymentProjectForEnvironment
(long environmentId) Get DeploymentProject associated with Environment@Nullable MutableDeploymentProject
getDeploymentProjectForVersion
(long versionId) Get DeploymentProject associated with VersiongetDeploymentProjectsReferencingArtifact
(long artifactId) Get all deployment projects that contain a version that uses specified artifact@NotNull List<MutableDeploymentProject>
getDeploymentProjectsRelatedToPlan
(@NotNull PlanKey planKey) Get DeploymentProjects linked to Plan with planKey.@NotNull List<MutableDeploymentProject>
getDeploymentProjectsRelatedToPlans
(@NotNull Set<PlanKey> planKeyFamily) Get DeploymentProjects linked to Plan identified with any of plan keys.@NotNull BambooEntityOid
getMaxDeploymentProjectOid
(int serverKey) getPaginatedDeploymentsWithEnvironments
(int start, int limit, String filter) Deprecated.getPaginatedDeploymentsWithEnvironmentsOnlyIds
(int start, int limit, String filter) Retrieves paginated list of pairs of MutableDeploymentProject.id and MutableEnvironment.id ordered byInternalDeploymentProject.getName()
andInternalEnvironment.getPosition()
.@Nullable MutableDeploymentProjectItem
getProjectItem
(long deploymentProjectItemId) Get DeploymentProjectItem by DB id@NotNull List<MutableDeploymentProjectItem>
getProjectItems
(long deploymentProjectId) Get list of DeploymentProject items@Nullable MutableVersionNamingScheme
getVersionNamingSchemeForProject
(long projectId) Get the version naming configuration for a specific projectboolean
isDeploymentProjectNameConflicting
(@NotNull String name) Deployment Project Names need to be unique within the system.void
Deprecated.since 9.5.void
save
(MutableDeploymentProjectItem deploymentProjectItem) Save DeploymentProjectItemvoid
save
(MutableDeploymentProject deploymentProject) Save DeploymentProjectvoid
save
(MutableVersionNamingScheme versionNamingScheme) Save the version naming Scheme
-
Method Details
-
countAllDeploymentProjects
long countAllDeploymentProjects()- Returns:
- number of deployment projects in the system
-
getAllDeploymentProjects
- Returns:
- list of all DeploymentProjects
-
getAllDeploymentProjects
@NotNull @NotNull List<MutableDeploymentProject> getAllDeploymentProjects(int firstResult, int maxResults) - Returns:
- paginated list of deployment projects,
firstResult
starts from 0
-
getDeploymentProjectsRelatedToPlan
@NotNull @NotNull List<MutableDeploymentProject> getDeploymentProjectsRelatedToPlan(@NotNull @NotNull PlanKey planKey) Get DeploymentProjects linked to Plan with planKey. This method will not perform any master-branch matching, returned DeploymentProjects will be linked to exact planKey regardless if it identifies master plan or branch.- Parameters:
planKey
- of the linked Plan
-
getDeploymentProjectsRelatedToPlans
@NotNull @NotNull List<MutableDeploymentProject> getDeploymentProjectsRelatedToPlans(@NotNull @NotNull Set<PlanKey> planKeyFamily) Get DeploymentProjects linked to Plan identified with any of plan keys.- Parameters:
planKeyFamily
- set of plan keys, usually it is set of all branch keys + master plan key
-
findDeploymentProjectsRelatedToArtifact
@NotNull @NotNull List<MutableDeploymentProject> findDeploymentProjectsRelatedToArtifact(long artifactId) -
getDeploymentProject
Get DeploymentProject by DB id -
getDeploymentProject
@Nullable @Nullable MutableDeploymentProject getDeploymentProject(@NotNull @NotNull DeploymentKey key) Get DeploymentProject by key -
save
Save DeploymentProject -
delete
Delete DeploymentProject and related DeploymentProjectItems -
getProjectItems
Get list of DeploymentProject items -
getProjectItem
Get DeploymentProjectItem by DB id -
getArtifactProjectItem
@Nullable @Nullable MutableDeploymentProjectItem getArtifactProjectItem(long deploymentProjectId, long artifactId) Get DeploymentProjectItem by DB id of the DeploymentProject and ArtifactDefinition -
doesArtifactProjectItemExist
boolean doesArtifactProjectItemExist(long deploymentProjectId, long artifactId) Check for existence of DeploymentProjectItem by DB id of the DeploymentProject and ArtifactDefinition -
save
Save DeploymentProjectItem -
delete
Delete DeploymentProjectItem -
isDeploymentProjectNameConflicting
Deployment Project Names need to be unique within the system. This method checks if a name is already being used- Parameters:
name
- to check- Returns:
- true if the name is already being used, otherwise false.
-
getDeploymentProjectForEnvironment
Get DeploymentProject associated with Environment- Parameters:
environmentId
- Environment id
-
getDeploymentProjectForVersion
Get DeploymentProject associated with Version- Parameters:
versionId
- Version id
-
getVersionNamingSchemeForProject
Get the version naming configuration for a specific project- Parameters:
projectId
- of the project
-
save
Save the version naming Scheme- Parameters:
versionNamingScheme
- to save
-
delete
Delete the version naming Scheme- Parameters:
versionNamingScheme
- to delete
-
getDeploymentProjectsReferencingArtifact
Get all deployment projects that contain a version that uses specified artifact- Parameters:
artifactId
-- Returns:
-
getDeploymentProjectCount
int getDeploymentProjectCount()- Returns:
- number of all deployment projects
-
getMaxDeploymentProjectOid
- Since:
- 5.11
-
findDeploymentProjectByOid
- Since:
- 6.1
-
findDeploymentProjectByName
- Since:
- 6.1
-
createNewDeploymentProjectInstance
- Since:
- 6.1
-
createNewVersionNamingSchemeInstance
- Since:
- 6.1
-
findDeploymentProjectsInOtherStates
@NotNull @NotNull Collection<Long> findDeploymentProjectsInOtherStates(VcsLocationBambooSpecsState specsState) -
findSpecsStateIdsReferencedByDeployments
- Since:
- 8.0
-
removeAbstractProjectItems
Deprecated.since 9.5. No-op. -
getPaginatedDeploymentsWithEnvironments
@Deprecated List<Pair<MutableDeploymentProject,MutableEnvironment>> getPaginatedDeploymentsWithEnvironments(int start, int limit, String filter) Deprecated.Retrieves paginated list of pairs of MutableDeploymentProject and MutableEnvironment ordered byInternalDeploymentProject.getName()
andInternalEnvironment.getPosition()
- Parameters:
start
-limit
-filter
-- Returns:
- list of pair MutableDeploymentProject with zero of one MutableEnvironment
- Since:
- 6.8
-
getPaginatedDeploymentsWithEnvironmentsOnlyIds
List<Pair<Long,Long>> getPaginatedDeploymentsWithEnvironmentsOnlyIds(int start, int limit, String filter) Retrieves paginated list of pairs of MutableDeploymentProject.id and MutableEnvironment.id ordered byInternalDeploymentProject.getName()
andInternalEnvironment.getPosition()
. If DeploymentProject has 0 Environments then there will be one pair with DeploymentProject id and second value as a null.- Parameters:
start
-limit
-filter
-- Returns:
- list of pair (MutableDeploymentProject id, MutableEnvironment id)
- Since:
- 8.2
-
findAllByIds
Returns a list of Deployment Projects which id values are in the deploymentsIds collection- Parameters:
deploymentsIds
- list of id values- Returns:
- list of Deployment Projects
- Since:
- 8.2
-
getPaginatedDeploymentsWithEnvironmentsOnlyIds(int, int, String)