Class PlanPredicates

java.lang.Object
com.atlassian.bamboo.plan.PlanPredicates

public class PlanPredicates extends Object
  • Constructor Details

    • PlanPredicates

      public PlanPredicates()
  • Method Details

    • isCloverEnabled

      public static boolean isCloverEnabled(ImmutablePlan plan)
      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

      public static Predicate<ImmutablePlan> isMyBranch(com.atlassian.user.User user)
      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

      public static boolean planIsMaster(ImmutablePlan plan)
    • withEqualProjectKey

      public static Predicate<ImmutablePlan> withEqualProjectKey(Project project)
    • hasEqualPlanKey

      public static Predicate<PlanIdentifier> hasEqualPlanKey(@NotNull @NotNull PlanKey planKey)
    • hasEqualBuildName

      public static Predicate<PlanIdentifier> hasEqualBuildName(@NotNull @NotNull String name)
    • isBranchOf

      public static <T extends ImmutablePlan> Predicate<T> isBranchOf(@NotNull @NotNull PlanIdentifier master)
    • hasJobs

      public static <T extends ImmutableChain> boolean hasJobs(@NotNull T chain)