Class PlanPredicates


  • public class PlanPredicates
    extends Object
    • Constructor Detail

      • PlanPredicates

        public PlanPredicates()
    • Method Detail

      • 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)
      • hasJobs

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