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 Detail

      • assertPlanPermission

        boolean assertPlanPermission​(@NotNull
                                     @NotNull PlanIdentifier plan)
        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
      • getBranchesForChain

        @NotNull
        @Deprecated
        @NotNull List<ImmutableChainBranch> getBranchesForChain​(@NotNull
                                                                @NotNull PlanIdentifier chain)
        Deprecated.
        since 6.2 use getBranchesOfChain(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

        @NotNull
        @NotNull Iterable<ImmutableTopLevelPlan> getEditablePlansByProject​(Project project)
        Returns all Plan's filtered by Project and user can edit (EDIT permission assigned for plan to user)
        Parameters:
        project - - that the plans will belong to
        Returns:
        editable plans for project
      • getPlans

        @NotNull
        <T extends ImmutablePlan> @NotNull List<T> getPlans​(Class<T> planType)
        Returns all Plan's filtered by Class. 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 com.google.common.base.Predicate<? super T> filter)
        Deprecated.
        since 5.11 this method warms the whole cache. Use it very carefully. Avoid it in core Bamboo.
        Returns all Plan's filtered by Class. 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 com.google.common.base.Predicate<? super T> filter)
        Returns all Plan's filtered by Class. 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()
      • getPlansByProjectWithConsistencyGuarantee

        @NotNull
        @NotNull List<ImmutableTopLevelPlan> getPlansByProjectWithConsistencyGuarantee​(Project project)
        Returns all ImmutableTopLevelPlan's filtered by Project. 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:
        ImmutableTopLevelPlan plans contained within the given project
        Since:
        9.4
      • getPlansByProject

        @NotNull
        <T extends ImmutablePlan> @NotNull List<T> getPlansByProject​(Project project,
                                                                     Class<T> planType)
        Returns all Plan's filtered by Project and Class. This method is Acegi-filtered. In clustered mode, there is NO consistency guarantee.
        Parameters:
        project - - that the plans will belong to
        planType - - 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 all Plan's filtered by Project and Class. 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
        planType - - 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 ImmutablePlanList<T> getPlansByProject​(@NotNull
                                                            @NotNull Project project,
                                                            @NotNull
                                                            @NotNull Class<T> planType,
                                                            @NotNull
                                                            @NotNull com.google.common.base.Predicate<? super T> filter)
      • getPlansForClone

        @NotNull
        @NotNull List<ImmutableChain> getPlansForClone()
        Returns all Chain'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)
        Returns all Plan's filtered by Project and Class. Only plans runnable by user will be returned.
        Parameters:
        project - - that the plans will belong to
        planType - - the type of the plan to retrieve
        Returns:
        plans contained within the given project and of the given type