Package com.atlassian.bamboo.repository
Interface PlanRepositoryLinkDao
- All Superinterfaces:
BambooObjectDao<PlanRepositoryLink>
- All Known Implementing Classes:
PlanRepositoryLinkHibernateDao
- Since:
- 3.4
-
Method Summary
Modifier and TypeMethodDescriptionvoiddetachAllRepositoriesFromPlan(@NotNull ImmutablePlan plan) Remove allPlanRepositoryLinkdefined for the .@NotNull List<PlanRepositoryLinkDto>Find all in DTO formgetIdentifiersOfPlansUsingRepository(long repositoryId) Get identifiers of Plans referencing a repository.getIdentifiersOfPlansUsingRepositoryOrItsDirectChildren(long repositoryId) Get identifiers of Plans referencing a repository, either directly or through inheritance (only direct parent-child relationship is checked)@Nullable PlanRepositoryLinkgetPlanRepositoryLink(@NotNull PlanIdentifier plan, long repositoryId) @Nullable PlanRepositoryLinkgetPlanRepositoryLinkByName(@NotNull PlanIdentifier plan, @NotNull String repositoryName) @NotNull List<PlanRepositoryLinkDto>getPlanRepositoryLinkDtos(long planId) @NotNull List<PlanRepositoryLinkDto>@NotNull List<PlanRepositoryLink>getPlanRepositoryLinks(@NotNull ImmutablePlan plan) @NotNull List<PlanRepositoryLink>getPlanRepositoryLinks(@NotNull PlanIdentifier plan) getPlansUsingRepository(long repositoryId) booleanisRepositoryOrItsDirectChildrenUsedInPlans(long repositoryId) Check if repository is used in plansvoidremoveLinksByParentRepositoryId(long parentId) Removes all link objects where repository is direct child of a repository with given id.voidremoveRepositoryFromPlan(@NotNull PlanRepositoryLink planRepository) Remove singlePlanRepositoryLink.Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
Method Details
-
getPlanRepositoryLinks
@NotNull @NotNull List<PlanRepositoryLink> getPlanRepositoryLinks(@NotNull @NotNull ImmutablePlan plan) - Parameters:
plan-- Returns:
- list of Source Repository relationships defined for the
Plansorted byPlanRepositoryLink.getPosition()
-
getPlanRepositoryLinks
@NotNull @NotNull List<PlanRepositoryLink> getPlanRepositoryLinks(@NotNull @NotNull PlanIdentifier plan) - Parameters:
plan-- Returns:
- list of Source Repository relationships defined for the
Plansorted byPlanRepositoryLink.getPosition() - Since:
- 5.14
-
getPlanRepositoryLinkDtos
- Parameters:
planId-- Returns:
- list of Source Repository relationships defined for the
Plansorted byPlanRepositoryLink.getPosition() - Since:
- 10.1
-
getPlanRepositoryLinkDtos
- Parameters:
plan-- Returns:
- list of Source Repository relationships defined for the
Plansorted byPlanRepositoryLink.getPosition() - Since:
- 9.3
-
getPlanRepositoryLink
@Nullable @Nullable PlanRepositoryLink getPlanRepositoryLink(@NotNull @NotNull PlanIdentifier plan, long repositoryId) - Parameters:
plan-repositoryId-- Returns:
- relationship between plan and repository if it exists, null otherwise
-
getPlanRepositoryLinkByName
@Nullable @Nullable PlanRepositoryLink getPlanRepositoryLinkByName(@NotNull @NotNull PlanIdentifier plan, @NotNull @NotNull String repositoryName) - Parameters:
plan-repositoryName-- Returns:
- relationship between plan and repository if it exists, null otherwise
-
detachAllRepositoriesFromPlan
Remove allPlanRepositoryLinkdefined for the . Does not deleteRepositoryDataEntityobjects.- Parameters:
plan-
-
removeRepositoryFromPlan
Remove singlePlanRepositoryLink. Does not deleteRepositoryDataEntity- Parameters:
planRepository-
-
getPlansUsingRepository
- Parameters:
repositoryId-- Returns:
- list of
Planthat reference a Source Repository
-
getIdentifiersOfPlansUsingRepository
Get identifiers of Plans referencing a repository. This is faster than getPlansUsingRepository() and should be preferred for 'view' actions.- Parameters:
repositoryId-- Returns:
- Since:
- 4.2
-
getIdentifiersOfPlansUsingRepositoryOrItsDirectChildren
Get identifiers of Plans referencing a repository, either directly or through inheritance (only direct parent-child relationship is checked)- Parameters:
repositoryId-- Returns:
- Since:
- 5.14
-
isRepositoryOrItsDirectChildrenUsedInPlans
boolean isRepositoryOrItsDirectChildrenUsedInPlans(long repositoryId) Check if repository is used in plans- Parameters:
repositoryId-- Returns:
- true if the given repository is used in any plan
- Since:
- 8.2
-
removeLinksByParentRepositoryId
void removeLinksByParentRepositoryId(long parentId) Removes all link objects where repository is direct child of a repository with given id.- Parameters:
parentId-- Since:
- 6.3
-
findAllDtos
Find all in DTO form- Since:
- 9.3
-