Package com.atlassian.bamboo.plan
Class PlanPredicates
java.lang.Object
com.atlassian.bamboo.plan.PlanPredicates
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Predicate<PlanIdentifier>
hasEqualBuildName
(@NotNull String name) static Predicate<PlanIdentifier>
hasEqualPlanKey
(@NotNull PlanKey planKey) static <T extends ImmutableChain>
booleanhasJobs
(T chain) static <T extends ImmutablePlan>
Predicate<T>isBranchOf
(@NotNull PlanIdentifier master) static boolean
isCloverEnabled
(ImmutablePlan plan) Check if plan is Clover enabled.static Predicate<ImmutablePlan>
isFavourite
(@NotNull LabelManager labelManager, @NotNull com.atlassian.user.User user) Get a predicate that returns true for Plans that are marked as favourite for a given user.static Predicate<ImmutablePlan>
isMyBranch
(com.atlassian.user.User user) Get a predicate that returns true for branches that "belong" to a user.static boolean
planIsMaster
(ImmutablePlan plan) static Predicate<ImmutablePlan>
withEqualProjectKey
(Project project)
-
Constructor Details
-
PlanPredicates
public PlanPredicates()
-
-
Method Details
-
isCloverEnabled
Check if plan is Clover enabled. For chains it will return true if any of its Jobs is Clover enabled. -
isFavourite
public static Predicate<ImmutablePlan> isFavourite(@NotNull @NotNull LabelManager labelManager, @NotNull @NotNull com.atlassian.user.User user) Get a predicate that returns true for Plans that are marked as favourite for a given user.- Parameters:
labelManager
-LabelManager
user
-User
whose favourites would be tested- Returns:
- Predicate object
- Throws:
NullPointerException
- when it operates on a null element
-
isMyBranch
Get a predicate that returns true for branches that "belong" to a user.- Parameters:
user
-User
whose branches would be tested- Returns:
- Predicate object
- Throws:
NullPointerException
- when it operates on a null element
-
planIsMaster
-
withEqualProjectKey
-
hasEqualPlanKey
-
hasEqualBuildName
-
isBranchOf
public static <T extends ImmutablePlan> Predicate<T> isBranchOf(@NotNull @NotNull PlanIdentifier master) -
hasJobs
-