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