Interface RequirementSet
- All Superinterfaces:
BambooIdProvider
,BambooObject
,ImmutableRequirementSet
,MinimalRequirementSet
- All Known Implementing Classes:
RequirementSetImpl
public interface RequirementSet
extends BambooObject, MinimalRequirementSet, ImmutableRequirementSet
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllRequirements
(Iterable<Requirement> requirements) Adds all the specified requirements to the setvoid
addRequirement
(@NotNull Requirement requirement) Adds a requirement to the set.@Nullable Requirement
getRequirement
(long id) Get a requirement from the set via the id.@Nullable Requirement
getRequirement
(@NotNull String key, long ownerId) Get a requirement from the set via the key and ownerId.@NotNull Set<Requirement>
Get all requirements as aSet
getRequirementsForPlugin
(@NotNull String pluginModuleKey, long ownerId) Gets all requirements that match the specifiedImmutableRequirement.getPluginModuleKey()
andImmutableRequirement.getOwnerId()
@NotNull Set<Requirement>
getSystemRequirements
(String type) Gets a subset of requirements which are of a particular system type.boolean
removeRequirement
(@NotNull ImmutableRequirement requirement) Removes the requirement from the set.int
removeRequirements
(@NotNull Iterable<Requirement> requirements) Removes all the specifiedRequirement
s from the set.int
removeRequirements
(@NotNull Predicate<Requirement> requirementPredicate) Remove requirements from set if they match the givenPredicate
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Method Details
-
getRequirements
Description copied from interface:ImmutableRequirementSet
Get all requirements as aSet
- Specified by:
getRequirements
in interfaceImmutableRequirementSet
- Returns:
- requirements
-
getRequirement
Get a requirement from the set via the key and ownerId.- Parameters:
key
-ownerId
-- Returns:
- requirement
-
getRequirement
Get a requirement from the set via the id.- Specified by:
getRequirement
in interfaceImmutableRequirementSet
- Parameters:
id
-- Returns:
- requirement
-
getRequirementsForPlugin
Gets all requirements that match the specifiedImmutableRequirement.getPluginModuleKey()
andImmutableRequirement.getOwnerId()
- Parameters:
pluginModuleKey
-ownerId
-- Returns:
- requirements
-
addRequirement
Adds a requirement to the set.- Parameters:
requirement
-
-
addAllRequirements
Adds all the specified requirements to the set- Parameters:
requirements
-
-
removeRequirement
Removes the requirement from the set.- Parameters:
requirement
- to remove- Returns:
- removed if the requirement was removed
-
removeRequirements
Remove requirements from set if they match the givenPredicate
- Parameters:
requirementPredicate
- for requirements to be removed from the currentRequirementSet
- Returns:
- count of matching requirements removed
-
removeRequirements
Removes all the specifiedRequirement
s from the set.- Parameters:
requirements
- to remove- Returns:
- count of matching requirements removed
-
getSystemRequirements
Gets a subset of requirements which are of a particular system type. e.g. system.builder or system.jdk.- Parameters:
type
-- Returns:
- requirements
-