public class

RequirementSetImpl

extends BambooEntityObject
implements RequirementSet
java.lang.Object
   ↳ com.atlassian.core.bean.EntityObject
     ↳ com.atlassian.bamboo.core.BambooEntityObject
       ↳ com.atlassian.bamboo.v2.build.agent.capability.RequirementSetImpl

Summary

[Expand]
Inherited Fields
From class com.atlassian.bamboo.core.BambooEntityObject
Public Constructors
RequirementSetImpl()
Public Methods
void addAllRequirements(Iterable<Requirement> requirements)
Adds all the specified requirements to the set
void addRequirement(Requirement requirement)
Adds a requirement to the set.
Requirement getRequirement(String key, long ownerId)
Get a requirement from the set via the key and ownerId.
Requirement getRequirement(String key)
Get a requirement from the set via the key.
Requirement getRequirement(long id)
Get a requirement from the set via the id.
@NotNull Set<Requirement> getRequirements()
Get all requirements as a Set
Set<Requirement> getRequirementsForPlugin(String pluginModuleKey, long ownerId)
Gets all requirements that match the specified getPluginModuleKey() and getOwnerId()
@NotNull Set<Requirement> getSystemRequirements(String type)
Gets a subset of requirements which are of a particular system type.
boolean removeRequirement(Requirement requirement)
Removes the requirement from the set.
void removeRequirement(String key)
Removes all the requirements matching the key from the set.
int removeRequirements(Predicate<Requirement> requirementPredicate)
Remove requirements from set if they match the given Predicate
int removeRequirements(Iterable<Requirement> requirementIterable)
Removes all the specified Requirements from the set.
void setRequirements(Set<Requirement> requirements)
String toString()
[Expand]
Inherited Methods
From class com.atlassian.bamboo.core.BambooEntityObject
From class com.atlassian.core.bean.EntityObject
From class java.lang.Object
From interface com.atlassian.bamboo.core.BambooIdProvider
From interface com.atlassian.bamboo.core.BambooObject
From interface com.atlassian.bamboo.v2.build.agent.capability.RequirementSet

Public Constructors

public RequirementSetImpl ()

Public Methods

public void addAllRequirements (Iterable<Requirement> requirements)

Adds all the specified requirements to the set

public void addRequirement (Requirement requirement)

Adds a requirement to the set.

public Requirement getRequirement (String key, long ownerId)

Get a requirement from the set via the key and ownerId.

Returns
  • requirement

public Requirement getRequirement (String key)

Get a requirement from the set via the key.

Returns
  • requirement

public Requirement getRequirement (long id)

Get a requirement from the set via the id.

Returns
  • requirement

@NotNull public Set<Requirement> getRequirements ()

Get all requirements as a Set

Returns
  • requirements

public Set<Requirement> getRequirementsForPlugin (String pluginModuleKey, long ownerId)

Gets all requirements that match the specified getPluginModuleKey() and getOwnerId()

Returns
  • requirements

@NotNull public Set<Requirement> getSystemRequirements (String type)

Gets a subset of requirements which are of a particular system type. e.g. system.builder or system.jdk.

Returns
  • requirements

public boolean removeRequirement (Requirement requirement)

Removes the requirement from the set.

Parameters
requirement to remove
Returns
  • removed if the requirement was removed

public void removeRequirement (String key)

Removes all the requirements matching the key from the set.

public int removeRequirements (Predicate<Requirement> requirementPredicate)

Remove requirements from set if they match the given Predicate

Parameters
requirementPredicate for requirements to be removed from the current RequirementSet
Returns
  • count of matching requirements removed

public int removeRequirements (Iterable<Requirement> requirementIterable)

Removes all the specified Requirements from the set.

Parameters
requirementIterable to remove
Returns
  • count of matching requirements removed

public void setRequirements (Set<Requirement> requirements)

public String toString ()