Class Requirement
java.lang.Object
com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<RequirementProperties>
com.atlassian.bamboo.specs.api.builders.requirement.Requirement
Represents a custom requirement.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionRequirement
(String key) Specifies an "exists" requirement with a specified key. -
Method Summary
Modifier and TypeMethodDescriptionprotected RequirementProperties
build()
static Requirement
Specifies a requirement that a capability with matching key has value equal to value of requirement.static Requirement
Specifies a requirement that a capability with matching key exists.static Requirement
Specifies a requirement that a capability with matching key has value that matches regexp provided in value of requirement.matchType
(Requirement.MatchType matchType) Sets a match type.matchValue
(String value) Sets a requirement value.
-
Constructor Details
-
Requirement
Specifies an "exists" requirement with a specified key.- Parameters:
key
- requirement key
-
-
Method Details
-
exists
Specifies a requirement that a capability with matching key exists.- Parameters:
key
- requirement key
-
equals
Specifies a requirement that a capability with matching key has value equal to value of requirement.- Parameters:
key
- requirement keyvalue
- requirement value
-
matches
Specifies a requirement that a capability with matching key has value that matches regexp provided in value of requirement.- Parameters:
key
- requirement keyregexp
- requirement value, in Java format- See Also:
-
matchValue
Sets a requirement value. Depending on the match type should be a string or a Java regular expression. -
matchType
Sets a match type. Possible values are:- EXISTS
- A capability with a matching key must exist, the value is not checked
- EQUALS
- A capability with a matching key must exist and its value must be equal to value of requirement
- MATCHES
- A capability with a matching key must exist and its value must match the value of requirement interpreted as Java regular expression
-
build
- Specified by:
build
in classEntityPropertiesBuilder<RequirementProperties>
-