jetbrains.buildServer.requirements
Class Requirement

java.lang.Object
  extended by jetbrains.buildServer.requirements.Requirement
All Implemented Interfaces:
XmlExternalizable

public final class Requirement
extends java.lang.Object
implements XmlExternalizable

A description of single build agent requirement needed for specific build configurations. A requirement has an associated property name (system property or environment variable), optional value, and type. System property name should be prefixed with Constants.SYSTEM_PREFIX, environment variable name should be prefixed with Constants.ENV_PREFIX There are various Requirement types, such as "exists", "match", "contains" and so on.

See Also:
RequirementType, Constants

Constructor Summary
Requirement(java.lang.String propertyName, java.lang.String propertyValue, RequirementType type)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getPropertyName()
           
 java.lang.String getPropertyValue()
           
 RequirementType getType()
           
 int hashCode()
           
 boolean match(java.util.Map<java.lang.String,java.lang.String> properties, boolean ignoreCaseForEnv)
           
 Requirement newPropertyName(java.lang.String newName)
           
 java.lang.String toString()
           
 void writeTo(org.jdom.Element element)
          Write data to the JDOM element
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Requirement

public Requirement(@NonNls
                   java.lang.String propertyName,
                   @Nullable
                   java.lang.String propertyValue,
                   @NotNull
                   RequirementType type)
Method Detail

match

public final boolean match(@NotNull
                           java.util.Map<java.lang.String,java.lang.String> properties,
                           boolean ignoreCaseForEnv)

getPropertyName

@NotNull
public java.lang.String getPropertyName()

getType

@NotNull
public RequirementType getType()

getPropertyValue

@Nullable
public java.lang.String getPropertyValue()

writeTo

public void writeTo(org.jdom.Element element)
Description copied from interface: XmlExternalizable
Write data to the JDOM element

Specified by:
writeTo in interface XmlExternalizable
Parameters:
element - - parent element to write data to

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

newPropertyName

public Requirement newPropertyName(java.lang.String newName)

toString

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