Interface DeploymentProjectDao
-
- All Known Implementing Classes:
DeploymentProjectDaoImpl
@Internal public interface DeploymentProjectDao
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description longcountAllDeploymentProjects()@NotNull MutableDeploymentProjectcreateNewDeploymentProjectInstance()@NotNull MutableVersionNamingSchemecreateNewVersionNamingSchemeInstance()voiddelete(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 ArtifactDefinitionList<MutableDeploymentProject>findAllByIds(Collection<Long> deploymentsIds)Returns a list of Deployment Projects which id values are in the deploymentsIds collection@Nullable MutableDeploymentProjectfindDeploymentProjectByName(String name)@Nullable MutableDeploymentProjectfindDeploymentProjectByOid(BambooEntityOid oid)@NotNull Collection<Long>findDeploymentProjectsInOtherStates(VcsLocationBambooSpecsState specsState)@NotNull List<MutableDeploymentProject>findDeploymentProjectsRelatedToArtifact(long artifactId)@NotNull Set<Long>findSpecsStateIdsReferencedByDeployments()@NotNull List<MutableDeploymentProject>getAllDeploymentProjects()@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 keyintgetDeploymentProjectCount()@Nullable MutableDeploymentProjectgetDeploymentProjectForEnvironment(long environmentId)Get DeploymentProject associated with Environment@Nullable MutableDeploymentProjectgetDeploymentProjectForVersion(long versionId)Get DeploymentProject associated with VersionList<MutableDeploymentProject>getDeploymentProjectsReferencingArtifact(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)List<Pair<MutableDeploymentProject,MutableEnvironment>>getPaginatedDeploymentsWithEnvironments(int start, int limit, String filter)Deprecated.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().@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.voidremoveAbstractProjectItems()Deprecated.since 9.5.voidsave(MutableDeploymentProjectItem deploymentProjectItem)Save DeploymentProjectItemvoidsave(MutableDeploymentProject deploymentProject)Save DeploymentProjectvoidsave(MutableVersionNamingScheme versionNamingScheme)Save the version naming Scheme
-
-
-
Method Detail
-
countAllDeploymentProjects
long countAllDeploymentProjects()
- Returns:
- number of deployment projects in the system
-
getAllDeploymentProjects
@NotNull @NotNull List<MutableDeploymentProject> 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 artifactId)
-
getDeploymentProject
@Nullable @Nullable MutableDeploymentProject getDeploymentProject(long deploymentProjectId)
Get DeploymentProject by DB id
-
getDeploymentProject
@Nullable @Nullable MutableDeploymentProject getDeploymentProject(@NotNull @NotNull DeploymentKey key)
Get DeploymentProject by key
-
save
void save(MutableDeploymentProject deploymentProject)
Save DeploymentProject
-
delete
void delete(MutableDeploymentProject deploymentProject)
Delete DeploymentProject and related DeploymentProjectItems
-
getProjectItems
@NotNull @NotNull List<MutableDeploymentProjectItem> getProjectItems(long deploymentProjectId)
Get list of DeploymentProject items
-
getProjectItem
@Nullable @Nullable MutableDeploymentProjectItem getProjectItem(long deploymentProjectItemId)
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
void save(MutableDeploymentProjectItem deploymentProjectItem)
Save DeploymentProjectItem
-
delete
void delete(MutableDeploymentProjectItem deploymentProjectItem)
Delete DeploymentProjectItem
-
isDeploymentProjectNameConflicting
boolean isDeploymentProjectNameConflicting(@NotNull @NotNull String name)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
@Nullable @Nullable MutableDeploymentProject getDeploymentProjectForEnvironment(long environmentId)
Get DeploymentProject associated with Environment- Parameters:
environmentId- Environment id
-
getDeploymentProjectForVersion
@Nullable @Nullable MutableDeploymentProject getDeploymentProjectForVersion(long versionId)
Get DeploymentProject associated with Version- Parameters:
versionId- Version id
-
getVersionNamingSchemeForProject
@Nullable @Nullable MutableVersionNamingScheme getVersionNamingSchemeForProject(long projectId)
Get the version naming configuration for a specific project- Parameters:
projectId- of the project
-
save
void save(MutableVersionNamingScheme versionNamingScheme)
Save the version naming Scheme- Parameters:
versionNamingScheme- to save
-
delete
void delete(MutableVersionNamingScheme versionNamingScheme)
Delete the version naming Scheme- Parameters:
versionNamingScheme- to delete
-
getDeploymentProjectsReferencingArtifact
List<MutableDeploymentProject> getDeploymentProjectsReferencingArtifact(long artifactId)
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
@NotNull @NotNull BambooEntityOid getMaxDeploymentProjectOid(int serverKey)
- Since:
- 5.11
-
findDeploymentProjectByOid
@Nullable @Nullable MutableDeploymentProject findDeploymentProjectByOid(BambooEntityOid oid)
- Since:
- 6.1
-
findDeploymentProjectByName
@Nullable @Nullable MutableDeploymentProject findDeploymentProjectByName(String name)
- Since:
- 6.1
-
createNewDeploymentProjectInstance
@NotNull @NotNull MutableDeploymentProject createNewDeploymentProjectInstance()
- Since:
- 6.1
-
createNewVersionNamingSchemeInstance
@NotNull @NotNull MutableVersionNamingScheme createNewVersionNamingSchemeInstance()
- Since:
- 6.1
-
findDeploymentProjectsInOtherStates
@NotNull @NotNull Collection<Long> findDeploymentProjectsInOtherStates(VcsLocationBambooSpecsState specsState)
-
findSpecsStateIdsReferencedByDeployments
@NotNull @NotNull Set<Long> findSpecsStateIdsReferencedByDeployments()
- Since:
- 8.0
-
removeAbstractProjectItems
@Deprecated void 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
List<MutableDeploymentProject> findAllByIds(Collection<Long> deploymentsIds)
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
-
-