com.atlassian.bamboo.v2.build.agent.capability
Class RequirementSetImpl

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.v2.build.agent.capability.RequirementSetImpl
All Implemented Interfaces:
BambooObject, RequirementSet, java.lang.Cloneable

public class RequirementSetImpl
extends BambooEntityObject
implements RequirementSet


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
RequirementSetImpl()
           
 
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)
          Get a requirement from the set via the key.
 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)
          Removes all the requirements matching the key from the set.
 int removeRequirements(java.lang.Iterable<Requirement> requirementIterable)
          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
 void setRequirements(java.util.Set<Requirement> requirements)
           
 java.lang.String toString()
           
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
getId, setId
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getLastModificationDate, hashCode, setClock, setCreationDate, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequirementSetImpl

public RequirementSetImpl()
Method Detail

getRequirement

public Requirement getRequirement(@NotNull
                                  java.lang.String key)
Description copied from interface: RequirementSet
Get a requirement from the set via the key.

Specified by:
getRequirement in interface RequirementSet
Returns:
requirement

getRequirement

public Requirement getRequirement(@NotNull
                                  java.lang.String key,
                                  long ownerId)
Description copied from interface: RequirementSet
Get a requirement from the set via the key and ownerId.

Specified by:
getRequirement in interface RequirementSet
Returns:
requirement

getRequirement

public Requirement getRequirement(long id)
Description copied from interface: RequirementSet
Get a requirement from the set via the id.

Specified by:
getRequirement in interface RequirementSet
Returns:
requirement

getRequirements

@NotNull
public java.util.Set<Requirement> getRequirements()
Description copied from interface: RequirementSet
Get all requirements as a Set

Specified by:
getRequirements in interface RequirementSet
Returns:
requirements

getRequirementsForPlugin

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

Specified by:
getRequirementsForPlugin in interface RequirementSet
Returns:
requirements

addRequirement

public void addRequirement(@NotNull
                           Requirement requirement)
Description copied from interface: RequirementSet
Adds a requirement to the set.

Specified by:
addRequirement in interface RequirementSet

addAllRequirements

public void addAllRequirements(java.lang.Iterable<Requirement> requirements)
Description copied from interface: RequirementSet
Adds all the specified requirements to the set

Specified by:
addAllRequirements in interface RequirementSet

removeRequirement

public void removeRequirement(@NotNull
                              java.lang.String key)
Description copied from interface: RequirementSet
Removes all the requirements matching the key from the set.

Specified by:
removeRequirement in interface RequirementSet

removeRequirement

public boolean removeRequirement(@NotNull
                                 Requirement requirement)
Description copied from interface: RequirementSet
Removes the requirement from the set.

Specified by:
removeRequirement in interface RequirementSet
Parameters:
requirement - to remove
Returns:
removed if the requirement was removed

removeRequirements

public int removeRequirements(@NotNull
                              com.google.common.base.Predicate<Requirement> requirementPredicate)
Description copied from interface: RequirementSet
Remove requirements from set if they match the given Predicate

Specified by:
removeRequirements in interface RequirementSet
Parameters:
requirementPredicate - for requirements to be removed from the current RequirementSet
Returns:
count of matching requirements removed

removeRequirements

public int removeRequirements(@NotNull
                              java.lang.Iterable<Requirement> requirementIterable)
Description copied from interface: RequirementSet
Removes all the specified Requirements from the set.

Specified by:
removeRequirements in interface RequirementSet
Parameters:
requirementIterable - to remove
Returns:
count of matching requirements removed

getSystemRequirements

@NotNull
public java.util.Set<Requirement> getSystemRequirements(java.lang.String type)
Description copied from interface: RequirementSet
Gets a subset of requirements which are of a particular system type. e.g. system.builder or system.jdk.

Specified by:
getSystemRequirements in interface RequirementSet
Returns:
requirements

setRequirements

public void setRequirements(java.util.Set<Requirement> requirements)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011 Atlassian. All Rights Reserved.