Package com.atlassian.bamboo.task
Class TaskPredicates
java.lang.Object
com.atlassian.bamboo.task.TaskPredicates
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.base.Predicate<TaskDefinition>
hasTaskDefinitionEqualId
(long id) Get a predicate that returns true forTaskDefinition
which has equal idstatic com.google.common.base.Predicate<TaskDefinition>
hasTaskDefinitionEqualId
(@NotNull TaskDefinition taskDefinition) Get a predicate that returns true forTaskDefinition
which has equal idstatic com.google.common.base.Predicate<TaskDefinition>
isConfigurationFieldEqual
(@NotNull String key, @NotNull String value) Get a predicate that returns true if TaskDefinition.getConfiguration contains key and value equal to passed in parameters.static com.google.common.base.Predicate<TaskDefinition>
isFinalisingEqual
(boolean isFinalising) Get a predicate that returns true if TaskDefinition.isFinalisingTask is equal to passed as parameterstatic com.google.common.base.Predicate<TaskDefinition>
Get a predicate that returns true for TaskDefinition which are marked as "finalizing"static com.google.common.base.Predicate<TaskIdentifier>
isTaskDefinitionPluginKeyEqual
(@NotNull String pluginKey) Deprecated.static com.google.common.base.Predicate<TaskDefinition>
Get a predicate that returns true forTaskDefinition
which is enabledstatic com.google.common.base.Predicate<TaskResult>
isTaskResultPluginKeyEqual
(@NotNull String pluginKey) Get a predicate that returns true forTaskResult
whichTaskDefinition
has equal pluginKeystatic com.google.common.base.Predicate<TaskModuleDescriptor>
-
Method Details
-
isFinalisingTaskDefinition
Get a predicate that returns true for TaskDefinition which are marked as "finalizing"- Returns:
- Predicate object
-
isFinalisingEqual
public static com.google.common.base.Predicate<TaskDefinition> isFinalisingEqual(boolean isFinalising) Get a predicate that returns true if TaskDefinition.isFinalisingTask is equal to passed as parameter- Parameters:
isFinalising
-- Returns:
- Predicate object
-
hasTaskDefinitionEqualId
Get a predicate that returns true forTaskDefinition
which has equal id- Parameters:
id
- id to be matched inTaskDefinition
- Returns:
- Predicate object
-
hasTaskDefinitionEqualId
public static com.google.common.base.Predicate<TaskDefinition> hasTaskDefinitionEqualId(@NotNull @NotNull TaskDefinition taskDefinition) Get a predicate that returns true forTaskDefinition
which has equal id- Parameters:
taskDefinition
-TaskDefinition
which id is to be matched- Returns:
- Predicate object
-
isTaskDefinitionPluginKeyEqual
@Deprecated public static com.google.common.base.Predicate<TaskIdentifier> isTaskDefinitionPluginKeyEqual(@NotNull @NotNull String pluginKey) Deprecated.since 5.15, useBambooPluginUtils.pluginKeyEquals(String)
Get a predicate that returns true forTaskResult
whichTaskDefinition
has equal pluginKey- Parameters:
pluginKey
- id to be matched inTaskDefinition
- Returns:
- Predicate object
-
isTaskEnabled
Get a predicate that returns true forTaskDefinition
which is enabled- Returns:
- Predicate object
-
isTaskResultPluginKeyEqual
public static com.google.common.base.Predicate<TaskResult> isTaskResultPluginKeyEqual(@NotNull @NotNull String pluginKey) Get a predicate that returns true forTaskResult
whichTaskDefinition
has equal pluginKey- Parameters:
pluginKey
- id to be matched inTaskDefinition
- Returns:
- Predicate object
-
providesExecutableConfiguration
public static com.google.common.base.Predicate<TaskModuleDescriptor> providesExecutableConfiguration() -
isConfigurationFieldEqual
public static com.google.common.base.Predicate<TaskDefinition> isConfigurationFieldEqual(@NotNull @NotNull String key, @NotNull @NotNull String value) Get a predicate that returns true if TaskDefinition.getConfiguration contains key and value equal to passed in parameters.- Parameters:
key
-value
-- Returns:
- Predicate object
-
BambooPluginUtils.pluginKeyEquals(String)