com.atlassian.bamboo.plan.cache
Interface CachedPlanManager

All Superinterfaces:
FilteringPlanManager
All Known Implementing Classes:
CachedPlanManagerImpl

public interface CachedPlanManager
extends FilteringPlanManager


Method Summary
 boolean assertPlanPermission(PlanIdentifier plan)
          Used to validate user permission for plan.
 java.util.List<ImmutableChainBranch> getBranchesForChain(PlanIdentifier chain)
          Get all feature branches associated with the given chain
 ImmutablePlan getPlanByKey(PlanKey planKey)
          Returns a ImmutablePlan by its planKey
<T extends ImmutablePlan>
T
getPlanByKey(PlanKey planKey, java.lang.Class<T> planType)
          Returns a ImmutablePlan by its planKey and Class
<T extends ImmutablePlan>
T
getPlanByKeyIfOfType(PlanKey planKey, java.lang.Class<T> planType)
          Returns a Plan by its planKey and if it's of the type Class.
 java.util.List<ImmutableTopLevelPlan> getPlans()
          Returns all TopLevelPlan's.
<T extends ImmutablePlan>
java.util.List<T>
getPlans(java.lang.Class<T> planType)
          Returns all Plan's filtered by Class.
<T extends ImmutablePlan>
java.util.List<T>
getPlans(java.lang.Class<T> planType, com.google.common.base.Predicate<? super T> filter)
          Returns all Plan's filtered by Class.
 java.util.List<ImmutableTopLevelPlan> getPlansByProject(Project project)
          Returns all ImmutableTopLevelPlan's filtered by Project.
<T extends ImmutablePlan>
java.util.List<T>
getPlansByProject(Project project, java.lang.Class<T> planType)
          Returns all Plan's filtered by Project and Class.
<T extends ImmutablePlan>
java.util.List<T>
getPlansByProject(Project project, java.lang.Class<T> planType, com.google.common.base.Predicate<? super T> filter)
           
 java.util.List<ImmutableTopLevelPlan> getPlansUnrestricted()
          Returns all ImmutableTopLevelPlan's ignoring permissions.
 
Methods inherited from interface com.atlassian.bamboo.plan.FilteringPlanManager
getAllPlansForClone, getPlansForClone, getRunnablePlans, getRunnablePlansByProject
 

Method Detail

getPlanByKey

@Nullable
ImmutablePlan getPlanByKey(@NotNull
                                    PlanKey planKey)
Returns a ImmutablePlan by its planKey

Parameters:
planKey - to search for
Returns:
plan with the given plan key or null if not found

getPlanByKey

@Nullable
<T extends ImmutablePlan> T getPlanByKey(@NotNull
                                                  PlanKey planKey,
                                                  java.lang.Class<T> planType)
                                     throws IncorrectPlanTypeException
Returns a ImmutablePlan by its planKey and Class

Parameters:
planKey - to search for
planType - - the type of the plan to retrieve
Returns:
plan with the given plan key, if found AND is of the correct type.
Throws:
IncorrectPlanTypeException - if plan cannot be found with the correct type

getPlanByKeyIfOfType

@Nullable
<T extends ImmutablePlan> T getPlanByKeyIfOfType(@NotNull
                                                          PlanKey planKey,
                                                          @NotNull
                                                          java.lang.Class<T> planType)
Returns a Plan by its planKey and if it's of the type Class. Does not throw IncorrectPlanTypeException. Should only be used when the type of the plan can not be known.

Type Parameters:
T -
Parameters:
planKey -
planType -
Returns:
null if the plan doesn't exist, or it's not of the found type

getPlans

@NotNull
java.util.List<ImmutableTopLevelPlan> getPlans()
Returns all TopLevelPlan's. This method is Acegi-filtered.

Returns:
plans

getPlansUnrestricted

@NotNull
java.util.List<ImmutableTopLevelPlan> getPlansUnrestricted()
Returns all ImmutableTopLevelPlan's ignoring permissions.

Returns:

getPlans

@NotNull
<T extends ImmutablePlan> java.util.List<T> getPlans(java.lang.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
<T extends ImmutablePlan> java.util.List<T> getPlans(java.lang.Class<T> planType,
                                                             @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.

Parameters:
planType - - the type of the plan to retrieve
Returns:
plans sorted by DescriptionProvider.getName()

getPlansByProject

@NotNull
java.util.List<ImmutableTopLevelPlan> getPlansByProject(Project project)
Returns all ImmutableTopLevelPlan's filtered by Project. This method is Acegi-filtered.

Parameters:
project - - that the plans will belong to
Returns:
ImmutableTopLevelPlan plans contained within the given project

getPlansByProject

@NotNull
<T extends ImmutablePlan> java.util.List<T> getPlansByProject(Project project,
                                                                      java.lang.Class<T> planType)
Returns all Plan's filtered by Project and Class. This method is Acegi-filtered.

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

getPlansByProject

<T extends ImmutablePlan> java.util.List<T> getPlansByProject(@NotNull
                                                              Project project,
                                                              @NotNull
                                                              java.lang.Class<T> planType,
                                                              @NotNull
                                                              com.google.common.base.Predicate<? super T> filter)

getBranchesForChain

@NotNull
java.util.List<ImmutableChainBranch> getBranchesForChain(@NotNull
                                                                 PlanIdentifier chain)
Get all feature branches associated with the given chain

Parameters:
chain - - the master
Returns:
List ChainBranchs associated with the given chain.

assertPlanPermission

boolean assertPlanPermission(@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


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.