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

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

public interface RequirementSet
extends BambooObject


Method Summary
 void addAllRequirements(java.lang.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(java.lang.String key)
          Deprecated. since 3.1 key is not unique
 Requirement getRequirement(java.lang.String key, long ownerId)
          Get a requirement from the set via the key and ownerId.
 java.util.Set<Requirement> getRequirements()
          Get all requirements as a Set
 java.util.Set<Requirement> getRequirementsForPlugin(java.lang.String pluginModuleKey, long ownerId)
          Gets all requirements that match the specified Requirement.getPluginModuleKey() and Requirement.getOwnerId()
 java.util.Set<Requirement> getSystemRequirements(java.lang.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(java.lang.String key)
          Deprecated. since 3.1 use removeRequirement(Requirement)
 int removeRequirements(java.lang.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
 

Method Detail

getRequirement

@Deprecated
@Nullable
Requirement getRequirement(@NotNull
                                               java.lang.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
                                    java.lang.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

getRequirements

@NotNull
java.util.Set<Requirement> getRequirements()
Get all requirements as a Set

Returns:
requirements

getRequirementsForPlugin

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

Parameters:
pluginModuleKey -
ownerId -
Returns:
requirements

addRequirement

void addRequirement(@NotNull
                    Requirement requirement)
Adds a requirement to the set.

Parameters:
requirement -

addAllRequirements

void addAllRequirements(java.lang.Iterable<Requirement> requirements)
Adds all the specified requirements to the set

Parameters:
requirements -

removeRequirement

@Deprecated
void removeRequirement(@NotNull
                                  java.lang.String key)
Deprecated. since 3.1 use removeRequirement(Requirement)

Removes all the requirements matching the key from the set.

Parameters:
key -

removeRequirement

boolean removeRequirement(@NotNull
                          Requirement 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
                       java.lang.Iterable<Requirement> requirements)
Removes all the specified Requirements from the set.

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

getSystemRequirements

@NotNull
java.util.Set<Requirement> getSystemRequirements(java.lang.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 © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.