Class BambooPluginPredicates
java.lang.Object
com.atlassian.bamboo.plugin.predicate.BambooPluginPredicates
Useful implementations of @link java.util.function.Predicate} related to plugins.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Predicate<com.atlassian.plugin.Plugin>
static Predicate<com.atlassian.plugin.Plugin>
static Predicate<com.atlassian.plugin.Plugin>
static Predicate<com.atlassian.plugin.Plugin>
isBlacklisted
(@NotNull Set<String> blacklist) Predicate that returnstrue
if a plugin key can be found on a blackliststatic Predicate<com.atlassian.plugin.Plugin>
static Predicate<com.atlassian.plugin.Plugin>
isEnabled
(com.atlassian.plugin.PluginAccessor pluginAccessor) static Predicate<com.atlassian.plugin.Plugin>
Predicate that returnstrue
if a plugin should run on agents, i.e.static Predicate<com.atlassian.plugin.Plugin>
isSystemProvided
(com.atlassian.plugin.metadata.PluginMetadataManager pluginMetadataManager) Predicate that returnstrue
if a plugin is provided by the system.static Predicate<com.atlassian.plugin.Plugin>
isUserInstalled
(com.atlassian.plugin.metadata.PluginMetadataManager pluginMetadataManager) Predicate that returnstrue
if a plugin is user installed.static Predicate<com.atlassian.plugin.Plugin>
-
Method Details
-
alwaysTrue
-
and
-
or
-
isRemoteAgentSupported
Predicate that returnstrue
if a plugin should run on agents, i.e. if any of its modules is annotated withRemoteAgentSupported
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 returnstrue
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
-
isEnabled
public static Predicate<com.atlassian.plugin.Plugin> isEnabled(com.atlassian.plugin.PluginAccessor pluginAccessor) -
isBundled
-