Package com.atlassian.bamboo.plan
Interface FilteringPlanManager
- All Known Subinterfaces:
CachedPlanManager
- All Known Implementing Classes:
CachedPlanManagerImpl
public interface FilteringPlanManager
All methods in this class apply permission checks based on Acegi. When, possible they are done declaratively through applicationContextAcegiAuthorization.xml .
In other cases, business code is responsible for applying permission checks.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanassertPlanPermission(@NotNull PlanIdentifier plan) Used to validate user permission for plan.getAnyPlan(Predicate<? super ImmutableChain> predicate) Returns a plan matching the supplied predicate.@NotNull List<ImmutableChainBranch> getBranchesForChain(@NotNull PlanIdentifier chain) Deprecated.@NotNull List<ImmutableChainBranch> getBranchesForChainWithConsistencyGuarantee(@NotNull PlanIdentifier chain) Get all feature branches associated with the given chain, sorted.@NotNull Stream<ImmutableChainBranch> getBranchesOfChain(@NotNull PlanKey chainKey) Get all feature branches associated with the given chain, unsorted.@NotNull Stream<ImmutableChainBranch> getBranchesOfChainWithConsistencyGuarantee(@NotNull PlanKey chainKey) Get all feature branches associated with the given chain, unsorted.@NotNull Iterable<ImmutableTopLevelPlan> getEditablePlansByProject(Project project) Returns chains that use repositories with given params@NotNull List<ImmutableTopLevelPlan> getPlans()Returns allTopLevelPlan's.<T extends ImmutablePlan>
@NotNull List<T> <T extends ImmutablePlan>
@NotNull List<T> Deprecated.since 5.11 this method warms the whole cache.<T extends ImmutablePlan>
List<T> getPlansByProject(@NotNull Project project, @NotNull Class<T> planType, @NotNull Predicate<? super T> filter) @NotNull List<ImmutableTopLevelPlan> getPlansByProject(Project project) Returns allImmutableTopLevelPlan's filtered byProject.<T extends ImmutablePlan>
@NotNull List<T> getPlansByProject(Project project, Class<T> planType) @NotNull List<ImmutableTopLevelPlan> Returns allImmutableTopLevelPlan's filtered byProject.<T extends ImmutablePlan>
@NotNull List<T> getPlansByProjectWithConsistencyGuarantee(Project project, Class<T> planType) @NotNull List<ImmutableChain> Returns allChain's.<T extends ImmutablePlan>
@NotNull List<T> getPlansWithConsistencyGuarantee(Class<T> planType, @NotNull Predicate<? super T> filter) <T extends ImmutablePlan>
@NotNull List<T> getRunnablePlans(@NotNull Project project, @NotNull Class<T> planType)
-
Method Details
-
assertPlanPermission
Used to validate user permission for plan. This method is Acegi-filtered.- Parameters:
plan- to check the permissions of- Returns:
- true if the current user has read(?) permissions on the plan
-
getAnyPlan
Returns a plan matching the supplied predicate. -
getBranchesForChain
@NotNull @Deprecated @NotNull List<ImmutableChainBranch> getBranchesForChain(@NotNull @NotNull PlanIdentifier chain) Deprecated.since 6.2 usegetBranchesOfChain(PlanKey)instead. Remember about sorting it for UI.Get all feature branches associated with the given chain, sorted. In clustered mode, there is NO consistency guarantee.- Parameters:
chain- - the master- Returns:
- List
ChainBranchs associated with the given chain.
-
getBranchesForChainWithConsistencyGuarantee
@NotNull @NotNull List<ImmutableChainBranch> getBranchesForChainWithConsistencyGuarantee(@NotNull @NotNull PlanIdentifier chain) Get all feature branches associated with the given chain, sorted. There is a guarantee that the data will be up-to-date.- Parameters:
chain- - the master- Returns:
- List
ChainBranchs associated with the given chain.
-
getBranchesOfChain
@NotNull @NotNull Stream<ImmutableChainBranch> getBranchesOfChain(@NotNull @NotNull PlanKey chainKey) Get all feature branches associated with the given chain, unsorted. In clustered mode, there is NO consistency guarantee.- Parameters:
chainKey- - the master- Returns:
- List
ChainBranchs associated with the given chain.
-
getBranchesOfChainWithConsistencyGuarantee
@NotNull @NotNull Stream<ImmutableChainBranch> getBranchesOfChainWithConsistencyGuarantee(@NotNull @NotNull PlanKey chainKey) Get all feature branches associated with the given chain, unsorted. There is a guarantee that the data will be up-to-date.- Parameters:
chainKey- - the master- Returns:
- List
ChainBranchs associated with the given chain. - Since:
- 9.4
-
getEditablePlansByProject
Returns allPlan's filtered byProjectand user can edit (EDIT permission assigned for plan to user)- Parameters:
project- - that the plans will belong to- Returns:
- editable plans for project
-
getPlans
Returns allTopLevelPlan's. This method is Acegi-filtered.- Returns:
- plans
-
getPlans
Returns allPlan's filtered byClass. Does not include plans marked for deletion. This method is Acegi-filtered.- Parameters:
planType- - the type of the plan to retrieve- Returns:
- plans sorted by
DescriptionProvider.getName()
-
getPlans
@NotNull @Deprecated <T extends ImmutablePlan> @NotNull List<T> getPlans(Class<T> planType, @NotNull @NotNull Predicate<? super T> filter) Deprecated.since 5.11 this method warms the whole cache. Use it very carefully. Avoid it in core Bamboo.Returns allPlan's filtered byClass. Does not include plans marked for deletion. This method is Acegi-filtered. In clustered mode, there is NO consistency guarantee.- Parameters:
planType- - the type of the plan to retrieve- Returns:
- plans sorted by
DescriptionProvider.getName()
-
getPlansWithConsistencyGuarantee
@NotNull <T extends ImmutablePlan> @NotNull List<T> getPlansWithConsistencyGuarantee(Class<T> planType, @NotNull @NotNull Predicate<? super T> filter) Returns allPlan's filtered byClass. Does not include plans marked for deletion. This method is Acegi-filtered. There is a guarantee that the data will be up-to-date.- Parameters:
planType- - the type of the plan to retrieve- Returns:
- plans sorted by
DescriptionProvider.getName()
-
getPlansByProject
Returns allImmutableTopLevelPlan's filtered byProject. This method is Acegi-filtered. In clustered mode, there is NO consistency guarantee.- Parameters:
project- - that the plans will belong to- Returns:
ImmutableTopLevelPlanplans contained within the given project
-
getPlansByProjectWithConsistencyGuarantee
@NotNull @NotNull List<ImmutableTopLevelPlan> getPlansByProjectWithConsistencyGuarantee(Project project) Returns allImmutableTopLevelPlan's filtered byProject. This method is Acegi-filtered. There is a guarantee that the data will be up-to-date.- Parameters:
project- - that the plans will belong to- Returns:
ImmutableTopLevelPlanplans contained within the given project- Since:
- 9.4
-
getPlansByProject
@NotNull <T extends ImmutablePlan> @NotNull List<T> getPlansByProject(Project project, Class<T> planType) Returns allPlan's filtered byProjectandClass. This method is Acegi-filtered. In clustered mode, there is NO consistency guarantee.- Parameters:
project- - that the plans will belong toplanType- - the type of the plan to retrieve- Returns:
- plans contained within the given project and of the given type
-
getPlansByProjectWithConsistencyGuarantee
@NotNull <T extends ImmutablePlan> @NotNull List<T> getPlansByProjectWithConsistencyGuarantee(Project project, Class<T> planType) Returns allPlan's filtered byProjectandClass. This method is Acegi-filtered. There is a guarantee that the data will be up-to-date.- Parameters:
project- - that the plans will belong toplanType- - the type of the plan to retrieve- Returns:
- plans contained within the given project and of the given type
- Since:
- 9.4
-
getPlansByProject
<T extends ImmutablePlan> List<T> getPlansByProject(@NotNull @NotNull Project project, @NotNull @NotNull Class<T> planType, @NotNull @NotNull Predicate<? super T> filter) -
getFilteredPlansWithRepository
Returns chains that use repositories with given params -
getPlansForClone
Returns allChain's. Return list filtered to show only plans the current user is allowed to clone.- Returns:
- plans
-
getRunnablePlans
@NotNull <T extends ImmutablePlan> @NotNull List<T> getRunnablePlans(@NotNull @NotNull Project project, @NotNull @NotNull Class<T> planType) - Parameters:
project- - that the plans will belong toplanType- - the type of the plan to retrieve- Returns:
- plans contained within the given project and of the given type
-
getBranchesOfChain(PlanKey)instead.