Interface DeploymentProjectDao
- All Known Implementing Classes:
DeploymentProjectDaoImpl
@Internal
public interface DeploymentProjectDao
-
Method Summary
Modifier and TypeMethodDescriptionlong@NotNull MutableDeploymentProject@NotNull MutableVersionNamingSchemevoiddelete(MutableDeploymentProjectItem deploymentProjectItem) Delete DeploymentProjectItemvoiddelete(MutableDeploymentProject deploymentProject) Delete DeploymentProject and related DeploymentProjectItemsvoiddelete(MutableVersionNamingScheme versionNamingScheme) Delete the version naming SchemebooleandoesArtifactProjectItemExist(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 artifactDefinitionId) findIdsOfDeploymentProjectsReferencingArtifact(long artifactId) findIdsOfDeploymentProjectsRelatedToArtifactDefinition(long artifactDefinitionId) @NotNull List<MutableDeploymentProject> @NotNull List<MutableDeploymentProject> getAllDeploymentProjects(int firstResult, int maxResults) @Nullable MutableDeploymentProjectItemgetArtifactProjectItem(long deploymentProjectId, long artifactId) Get DeploymentProjectItem by DB id of the DeploymentProject and ArtifactDefinition@Nullable MutableDeploymentProjectgetDeploymentProject(long deploymentProjectId) Get DeploymentProject by DB id@Nullable MutableDeploymentProjectgetDeploymentProject(@NotNull DeploymentKey key) Get DeploymentProject by keyint@Nullable MutableDeploymentProjectgetDeploymentProjectForEnvironment(long environmentId) Get DeploymentProject associated with Environment@Nullable MutableDeploymentProjectgetDeploymentProjectForVersion(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 BambooEntityOidgetMaxDeploymentProjectOid(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 MutableDeploymentProjectItemgetProjectItem(long deploymentProjectItemId) Get DeploymentProjectItem by DB id@NotNull List<MutableDeploymentProjectItem> getProjectItems(long deploymentProjectId) Get list of DeploymentProject items@Nullable MutableVersionNamingSchemegetVersionNamingSchemeForProject(long projectId) Get the version naming configuration for a specific projectbooleanisDeploymentProjectNameConflicting(@NotNull String name) Deployment Project Names need to be unique within the system.voidsave(MutableDeploymentProjectItem deploymentProjectItem) Save DeploymentProjectItemvoidsave(MutableDeploymentProject deploymentProject) Save DeploymentProjectvoidsave(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,
firstResultstarts 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 artifactDefinitionId) -
findIdsOfDeploymentProjectsRelatedToArtifactDefinition
@NotNull @NotNull List<Long> findIdsOfDeploymentProjectsRelatedToArtifactDefinition(long artifactDefinitionId) - Returns:
- ids of the deployment projects related to an artifact
- Since:
- 11.0
-
findIdsOfDeploymentProjectsReferencingArtifact
- Returns:
- ids of the deployment projects that reference an artifact
- Since:
- 11.0
-
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
-
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)