Enum RequirementType
- java.lang.Object
-
- java.lang.Enum<RequirementType>
-
- jetbrains.buildServer.requirements.RequirementType
-
- All Implemented Interfaces:
Serializable
,Comparable<RequirementType>
public enum RequirementType extends Enum<RequirementType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANY
CONTAINS
DOES_NOT_CONTAIN
DOES_NOT_EQUAL
DOES_NOT_MATCH
ENDS_WITH
EQUALS
EXISTS
LESS_THAN
MATCHES
MORE_THAN
NO_LESS_THAN
NO_MORE_THAN
NOT_EXISTS
STARTS_WITH
VER_LESS_THAN
VER_MORE_THAN
VER_NO_LESS_THAN
VER_NO_MORE_THAN
-
Field Summary
Fields Modifier and Type Field Description static List<RequirementType>
ALL_REQUIREMENT_TYPES
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract jetbrains.buildServer.requirements.RequirementType.ValueMatcher
createMatcher(String requirementParameter)
RequirementMatcher
createRequirementMatcher(Requirement requirement)
static RequirementType
findByName(String name)
String
getDisplayName()
String
getName()
boolean
isActualValueCanBeEmpty()
Deprecated.Should not be exposed, implementation detail, since 2022.10boolean
isActualValueRequired()
Deprecated.Should not be exposed, implementation detail, since 2022.10boolean
isParameterCanBeEmpty()
Return true if not empty value is required for requirement parameter.boolean
isParameterRequired()
Return true if the requirement has an additional parameter.boolean
match(Requirement requirement, Map<String,String> properties, boolean ignoreCaseForEnv)
boolean
matchValues(String requirementParameter, String actualValue)
boolean
matchValues(jetbrains.buildServer.requirements.RequirementType.ValueMatcher valueMatcher, String actualValue)
Requirement
readFrom(org.jdom.Element xmlElement)
protected Requirement
readInternal(String propName, String propValue)
static RequirementType
valueOf(String name)
Returns the enum constant of this type with the specified name.static RequirementType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.void
writeTo(org.jdom.Element xmlElement, Requirement requirementParameter)
-
-
-
Enum Constant Detail
-
EXISTS
public static final RequirementType EXISTS
-
NOT_EXISTS
public static final RequirementType NOT_EXISTS
-
EQUALS
public static final RequirementType EQUALS
-
DOES_NOT_EQUAL
public static final RequirementType DOES_NOT_EQUAL
-
MORE_THAN
public static final RequirementType MORE_THAN
-
NO_MORE_THAN
public static final RequirementType NO_MORE_THAN
-
LESS_THAN
public static final RequirementType LESS_THAN
-
NO_LESS_THAN
public static final RequirementType NO_LESS_THAN
-
STARTS_WITH
public static final RequirementType STARTS_WITH
-
CONTAINS
public static final RequirementType CONTAINS
-
DOES_NOT_CONTAIN
public static final RequirementType DOES_NOT_CONTAIN
-
ENDS_WITH
public static final RequirementType ENDS_WITH
-
MATCHES
public static final RequirementType MATCHES
-
DOES_NOT_MATCH
public static final RequirementType DOES_NOT_MATCH
-
VER_MORE_THAN
public static final RequirementType VER_MORE_THAN
-
VER_NO_MORE_THAN
public static final RequirementType VER_NO_MORE_THAN
-
VER_LESS_THAN
public static final RequirementType VER_LESS_THAN
-
VER_NO_LESS_THAN
public static final RequirementType VER_NO_LESS_THAN
-
ANY
public static final RequirementType ANY
-
-
Field Detail
-
ALL_REQUIREMENT_TYPES
public static final List<RequirementType> ALL_REQUIREMENT_TYPES
-
-
Method Detail
-
values
public static RequirementType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RequirementType c : RequirementType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RequirementType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getDisplayName
public String getDisplayName()
-
getName
public final String getName()
-
readFrom
@Nullable public Requirement readFrom(org.jdom.Element xmlElement)
-
writeTo
public void writeTo(org.jdom.Element xmlElement, Requirement requirementParameter)
-
findByName
@Nullable public static RequirementType findByName(String name)
-
readInternal
protected Requirement readInternal(String propName, String propValue)
-
isParameterRequired
public boolean isParameterRequired()
Return true if the requirement has an additional parameter. I.e. when UI should show extra field with extra value and such value should be stored. Cases when you want to return false here: exists/non-exists requirements- Returns:
- see above
-
isParameterCanBeEmpty
public boolean isParameterCanBeEmpty()
Return true if not empty value is required for requirement parameter. I.e. when editing in UI/DSL, some non-empty value for the parameter should be set.- Returns:
- if not empty value required.
-
isActualValueRequired
public boolean isActualValueRequired()
Deprecated.Should not be exposed, implementation detail, since 2022.10Return true if actual property value is required, should be used during the actual matching with the value- Returns:
- see above
-
isActualValueCanBeEmpty
public boolean isActualValueCanBeEmpty()
Deprecated.Should not be exposed, implementation detail, since 2022.10Return true if not empty value of actual property value is required, should be used during the actual matching with the value- Returns:
- see above
-
matchValues
public boolean matchValues(@NotNull jetbrains.buildServer.requirements.RequirementType.ValueMatcher valueMatcher, @Nullable String actualValue)
-
createMatcher
@NotNull protected abstract jetbrains.buildServer.requirements.RequirementType.ValueMatcher createMatcher(String requirementParameter)
-
createRequirementMatcher
@NotNull public RequirementMatcher createRequirementMatcher(@NotNull Requirement requirement)
-
match
public boolean match(@NotNull Requirement requirement, @NotNull Map<String,String> properties, boolean ignoreCaseForEnv)
-
-