Package com.atlassian.bamboo.repository
Interface PlanRepositoryLinkDao
-
- All Superinterfaces:
BambooObjectDao<PlanRepositoryLink>
- All Known Implementing Classes:
PlanRepositoryLinkHibernateDao
public interface PlanRepositoryLinkDao extends BambooObjectDao<PlanRepositoryLink>
- Since:
- 3.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
detachAllRepositoriesFromPlan(@NotNull ImmutablePlan plan)
Remove allPlanRepositoryLink
defined for the .@NotNull List<PlanRepositoryLinkDto>
findAllDtos()
Find all in DTO formList<PlanIdentifier>
getIdentifiersOfPlansUsingRepository(long repositoryId)
Get identifiers of Plans referencing a repository.List<PlanIdentifier>
getIdentifiersOfPlansUsingRepositoryOrItsDirectChildren(long repositoryId)
Get identifiers of Plans referencing a repository, either directly or through inheritance (only direct parent-child relationship is checked)@Nullable PlanRepositoryLink
getPlanRepositoryLink(@NotNull PlanIdentifier plan, long repositoryId)
@Nullable PlanRepositoryLink
getPlanRepositoryLinkByName(@NotNull PlanIdentifier plan, @NotNull String repositoryName)
@NotNull List<PlanRepositoryLinkDto>
getPlanRepositoryLinkDtos(@NotNull PlanIdentifier plan)
@NotNull List<PlanRepositoryLink>
getPlanRepositoryLinks(@NotNull ImmutablePlan plan)
@NotNull List<PlanRepositoryLink>
getPlanRepositoryLinks(@NotNull PlanIdentifier plan)
List<PlanRepositoryLink>
getPlansUsingRepository(long repositoryId)
boolean
isRepositoryOrItsDirectChildrenUsedInPlans(long repositoryId)
Check if repository is used in plansvoid
removeLinksByParentRepositoryId(long parentId)
Removes all link objects where repository is direct child of a repository with given id.void
removeRepositoryFromPlan(@NotNull PlanRepositoryLink planRepository)
Remove singlePlanRepositoryLink
.-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
-
-
-
Method Detail
-
getPlanRepositoryLinks
@NotNull @NotNull List<PlanRepositoryLink> getPlanRepositoryLinks(@NotNull @NotNull ImmutablePlan plan)
- Parameters:
plan
-- Returns:
- list of Source Repository relationships defined for the
Plan
sorted byPlanRepositoryLink.getPosition()
-
getPlanRepositoryLinks
@NotNull @NotNull List<PlanRepositoryLink> getPlanRepositoryLinks(@NotNull @NotNull PlanIdentifier plan)
- Parameters:
plan
-- Returns:
- list of Source Repository relationships defined for the
Plan
sorted byPlanRepositoryLink.getPosition()
- Since:
- 5.14
-
getPlanRepositoryLinkDtos
@NotNull @NotNull List<PlanRepositoryLinkDto> getPlanRepositoryLinkDtos(@NotNull @NotNull PlanIdentifier plan)
- Parameters:
plan
-- Returns:
- list of Source Repository relationships defined for the
Plan
sorted 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
void detachAllRepositoriesFromPlan(@NotNull @NotNull ImmutablePlan plan)
Remove allPlanRepositoryLink
defined for the . Does not deleteRepositoryDataEntity
objects.- Parameters:
plan
-
-
removeRepositoryFromPlan
void removeRepositoryFromPlan(@NotNull @NotNull PlanRepositoryLink planRepository)
Remove singlePlanRepositoryLink
. Does not deleteRepositoryDataEntity
- Parameters:
planRepository
-
-
getPlansUsingRepository
List<PlanRepositoryLink> getPlansUsingRepository(long repositoryId)
- Parameters:
repositoryId
-- Returns:
- list of
Plan
that reference a Source Repository
-
getIdentifiersOfPlansUsingRepository
List<PlanIdentifier> getIdentifiersOfPlansUsingRepository(long repositoryId)
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
List<PlanIdentifier> getIdentifiersOfPlansUsingRepositoryOrItsDirectChildren(long repositoryId)
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
@NotNull @NotNull List<PlanRepositoryLinkDto> findAllDtos()
Find all in DTO form- Since:
- 9.3
-
-