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:
BambooIdProvider, 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()
           
RequirementSetImpl(RequirementSet other)
           
 
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.
 boolean equals(java.lang.Object o)
          This method needs to be here in order to use proper id
 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.
 int hashCode()
          This method needs to be here in order to use proper id
 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, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 

Constructor Detail

RequirementSetImpl

public RequirementSetImpl()

RequirementSetImpl

public RequirementSetImpl(@NotNull
                          RequirementSet other)
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

equals

public boolean equals(java.lang.Object o)
Description copied from class: BambooEntityObject
This method needs to be here in order to use proper id

Overrides:
equals in class BambooEntityObject

hashCode

public int hashCode()
Description copied from class: BambooEntityObject
This method needs to be here in order to use proper id

Overrides:
hashCode in class BambooEntityObject


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.