com.atlassian.bamboo.v2.build.agent.capability
Interface RequirementSet

All Superinterfaces:
BambooIdProvider, BambooObject, MinimalRequirementSet
All Known Implementing Classes:
RequirementSetImpl

public interface RequirementSet
extends BambooObject, MinimalRequirementSet


Method Summary
 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(long id)
          Get a requirement from the set via the id.
 Requirement getRequirement(String key)
          Deprecated. since 3.1 key is not unique
 Requirement getRequirement(String key, long ownerId)
          Get a requirement from the set via the key and ownerId.
 Set<Requirement> getRequirementsForPlugin(String pluginModuleKey, long ownerId)
          Gets all requirements that match the specified ImmutableRequirement.getPluginModuleKey() and ImmutableRequirement.getOwnerId()
 Set<Requirement> getSystemRequirements(String type)
          Gets a subset of requirements which are of a particular system type.
 boolean removeRequirement(ImmutableRequirement requirement)
          Removes the requirement from the set.
 void removeRequirement(String key)
          Deprecated. since 3.1 use removeRequirement(ImmutableRequirement)
 int removeRequirements(Iterable<Requirement> requirements)
          Removes all the specified Requirements from the set.
 int removeRequirements(com.google.common.base.Predicate<Requirement> requirementPredicate)
          Remove requirements from set if they match the given Predicate
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 
Methods inherited from interface com.atlassian.bamboo.v2.build.agent.capability.MinimalRequirementSet
getRequirements
 

Method Detail

getRequirement

@Deprecated
@Nullable
Requirement getRequirement(@NotNull
                                               String key)
Deprecated. since 3.1 key is not unique

Get a requirement from the set via the key.

Parameters:
key -
Returns:
requirement

getRequirement

@Nullable
Requirement getRequirement(@NotNull
                                    String key,
                                    long ownerId)
Get a requirement from the set via the key and ownerId.

Parameters:
key -
ownerId -
Returns:
requirement

getRequirement

@Nullable
Requirement getRequirement(long id)
Get a requirement from the set via the id.

Parameters:
id -
Returns:
requirement

getRequirementsForPlugin

Set<Requirement> getRequirementsForPlugin(@NotNull
                                          String pluginModuleKey,
                                          long ownerId)
Gets all requirements that match the specified ImmutableRequirement.getPluginModuleKey() and ImmutableRequirement.getOwnerId()

Parameters:
pluginModuleKey -
ownerId -
Returns:
requirements

addRequirement

void addRequirement(@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

@Deprecated
void removeRequirement(@NotNull
                                  String key)
Deprecated. since 3.1 use removeRequirement(ImmutableRequirement)

Removes all the requirements matching the key from the set.

Parameters:
key -

removeRequirement

boolean removeRequirement(@NotNull
                          ImmutableRequirement requirement)
Removes the requirement from the set.

Parameters:
requirement - to remove
Returns:
removed if the requirement was removed

removeRequirements

int removeRequirements(@NotNull
                       com.google.common.base.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

removeRequirements

int removeRequirements(@NotNull
                       Iterable<Requirement> requirements)
Removes all the specified Requirements from the set.

Parameters:
requirements - to remove
Returns:
count of matching requirements removed

getSystemRequirements

@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


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.