Class BambooPluginPredicates

java.lang.Object
com.atlassian.bamboo.plugin.predicate.BambooPluginPredicates

public final class BambooPluginPredicates extends Object
Useful implementations of @link java.util.function.Predicate} related to plugins.
  • Method Details

    • alwaysTrue

      public static Predicate<com.atlassian.plugin.Plugin> alwaysTrue()
    • and

      public static Predicate<com.atlassian.plugin.Plugin> and(Predicate<com.atlassian.plugin.Plugin>... predicates)
    • or

      public static Predicate<com.atlassian.plugin.Plugin> or(Predicate<com.atlassian.plugin.Plugin>... predicates)
    • isRemoteAgentSupported

      public static Predicate<com.atlassian.plugin.Plugin> isRemoteAgentSupported()
      Predicate that returns true if a plugin should run on agents, i.e. if any of its modules is annotated with RemoteAgentSupported or it's whitelisted for remote agent use.
      Returns:
      predicate to check if a plugin is supported on remote agents.
    • isBlacklisted

      public static Predicate<com.atlassian.plugin.Plugin> isBlacklisted(@NotNull @NotNull Set<String> blacklist)
      Predicate that returns true if a plugin key can be found on a blacklist
      Parameters:
      blacklist - set of strings that define plugin blacklist
      Returns:
      predicate to check if plugin is blacklisted
    • isUserInstalled

      public static Predicate<com.atlassian.plugin.Plugin> isUserInstalled(com.atlassian.plugin.metadata.PluginMetadataManager pluginMetadataManager)

      Predicate that returns true if a plugin is user installed.

      Needs instance of PluginMetadataManager to do the job.

      Parameters:
      pluginMetadataManager - manager used to do the check
      Returns:
      predicate to check if a plugin is user installed.
    • isSystemProvided

      public static Predicate<com.atlassian.plugin.Plugin> isSystemProvided(com.atlassian.plugin.metadata.PluginMetadataManager pluginMetadataManager)

      Predicate that returns true if a plugin is provided by the system.

      Needs instance of PluginMetadataManager to do the job.

      Parameters:
      pluginMetadataManager - manager used to do the check
      Returns:
      predicate to check if a plugin is provided by the system.
    • isAvailable

      public static Predicate<com.atlassian.plugin.Plugin> isAvailable()
    • isEnabled

      public static Predicate<com.atlassian.plugin.Plugin> isEnabled(com.atlassian.plugin.PluginAccessor pluginAccessor)
    • isBundled

      public static Predicate<com.atlassian.plugin.Plugin> isBundled()