public interface CachedPlanManager extends FilteringPlanManager
Modifier and Type | Method and Description |
---|---|
Optional<ImmutableChain> |
getAnyPlan(Predicate<? super ImmutableChain> predicate)
Returns a plan matching the supplied predicate, permission filtering is applied.
|
Optional<ImmutableChain> |
getAnyPlanUnrestricted(Predicate<? super ImmutableChain> predicate)
Returns a plan matching the supplied predicate.
|
ImmutableJob |
getMasterOfJob(PlanKey masterChainKey,
PlanKey jobKey) |
ImmutableChain |
getMasterPlan(PlanKey branchKey)
Returns master branch for a given branchKey.
|
<T extends ImmutablePlan> |
getPlanById(long id,
Class<T> planType)
Returns a
ImmutablePlan by its database id and Class |
ImmutablePlan |
getPlanByKey(PlanKey planKey)
Returns a
ImmutablePlan by its planKey |
<T extends ImmutablePlan> |
getPlanByKey(PlanKey planKey,
Class<T> planType)
Returns a
ImmutablePlan by its planKey and Class |
<T extends ImmutablePlan> |
getPlanByKeyIfOfType(PlanKey planKey,
Class<T> planType)
|
List<ImmutableTopLevelPlan> |
getPlansUnrestricted()
Returns all
ImmutableTopLevelPlan 's ignoring permissions. |
Iterable<ImmutableChain> |
getPlansWithRepository(PlanRepositoryIndex.Query query)
Returns chains that use repositories with given params
|
boolean |
isBranchOf(PlanKey chainKey,
PlanKey branchKey)
Test if plan identified by branchKey is a branch of plan identified by chainKey.
|
assertPlanPermission, getBranchesForChain, getEditablePlansByProject, getFilteredPlansWithRepository, getPlans, getPlans, getPlans, getPlansByProject, getPlansByProject, getPlansByProject, getPlansForClone, getRunnablePlans
@Nullable ImmutablePlan getPlanByKey(@NotNull PlanKey planKey)
ImmutablePlan
by its planKeyplanKey
- to search for@Nullable <T extends ImmutablePlan> T getPlanByKey(@NotNull PlanKey planKey, Class<T> planType) throws IncorrectPlanTypeException
ImmutablePlan
by its planKey and Class
planKey
- to search forplanType
- - the type of the plan to retrieveIncorrectPlanTypeException
- if plan cannot be found with the correct type@Nullable <T extends ImmutablePlan> T getPlanByKeyIfOfType(@NotNull PlanKey planKey, @NotNull Class<T> planType)
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.T
- planKey
- planType
- Optional<ImmutableChain> getAnyPlan(Predicate<? super ImmutableChain> predicate)
getAnyPlan
in interface FilteringPlanManager
Optional<ImmutableChain> getAnyPlanUnrestricted(Predicate<? super ImmutableChain> predicate)
@Nullable <T extends ImmutablePlan> T getPlanById(long id, Class<T> planType) throws IncorrectPlanTypeException
ImmutablePlan
by its database id and Class
id
- to search forplanType
- - the type of the plan to retrieveIncorrectPlanTypeException
- if plan cannot be found with the correct type@NotNull List<ImmutableTopLevelPlan> getPlansUnrestricted()
ImmutableTopLevelPlan
's ignoring permissions.@Nullable ImmutableChain getMasterPlan(@NotNull PlanKey branchKey)
branchKey
- key of a branchboolean isBranchOf(@NotNull PlanKey chainKey, @NotNull PlanKey branchKey)
chainKey
- key of master branchbranchKey
- key of alleged branch@Nullable ImmutableJob getMasterOfJob(@NotNull PlanKey masterChainKey, @NotNull PlanKey jobKey)
Iterable<ImmutableChain> getPlansWithRepository(@NotNull PlanRepositoryIndex.Query query)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.