Class RequirementDetailsImpl
- java.lang.Object
-
- com.atlassian.bamboo.v2.build.requirement.RequirementDetailsImpl
-
- All Implemented Interfaces:
BambooIdProvider
,ImmutableRequirement
,RequirementDetails
public class RequirementDetailsImpl extends Object implements RequirementDetails
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.bamboo.v2.build.requirement.ImmutableRequirement
ImmutableRequirement.MatchType
-
-
Constructor Summary
Constructors Constructor Description RequirementDetailsImpl(@NotNull ImmutableRequirement immutableRequirement, @NotNull CapabilityType capabilityType, @Nullable String ownerName, Integer matchingAgents, Integer matchingImages, Integer matchingEphemeralAgentTemplates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getId()
@NotNull String
getKey()
Represents the requirement.Integer
getMatchingAgents()
Number of non-elastic agents that match this requirementInteger
getMatchingEphemeralAgentTemplates()
Number of ephemeral agent templates that match this requirementInteger
getMatchingImages()
Number of elastic images that match this requirement@Nullable String
getMatchValue()
A match requirement value.long
getOwnerId()
The identifier of thisRequirement
that is used to identify it uniquely for allRequirement
s created byImmutableRequirement.getPluginModuleKey()
@Nullable String
getOwnerName()
@Nullable String
getPluginModuleKey()
TheModuleDescriptor.getKey()
that is responsible for the Lifecycle of thisRequirement
@NotNull String
getRequirementLabel()
@NotNull ImmutableRequirement.MatchType
getTypeOfMatch()
Boolean
isReadonly()
If a requirement is readonly, it cannot be removed through the UI (the backend can do what it wants, however)boolean
isRegexMatch()
Is this a regex match requirement or exact match requirement.
-
-
-
Constructor Detail
-
RequirementDetailsImpl
public RequirementDetailsImpl(@NotNull @NotNull ImmutableRequirement immutableRequirement, @NotNull @NotNull CapabilityType capabilityType, @Nullable @Nullable String ownerName, Integer matchingAgents, Integer matchingImages, Integer matchingEphemeralAgentTemplates)
-
-
Method Detail
-
getId
public long getId()
- Specified by:
getId
in interfaceBambooIdProvider
-
getKey
@NotNull public @NotNull String getKey()
Description copied from interface:ImmutableRequirement
Represents the requirement. Must match exactly to theCapability
getKey().- Specified by:
getKey
in interfaceImmutableRequirement
- Returns:
-
getRequirementLabel
@NotNull public @NotNull String getRequirementLabel()
- Specified by:
getRequirementLabel
in interfaceRequirementDetails
- Returns:
- User friendly name of the capability that the requirement requires.
-
getMatchValue
@Nullable public @Nullable String getMatchValue()
Description copied from interface:ImmutableRequirement
A match requirement value. Even "EXISTS" matches are represented as a regex match with match value ".*"The regex must match the
Capability
value.- Specified by:
getMatchValue
in interfaceImmutableRequirement
- Returns:
- the value to match.
-
getTypeOfMatch
@NotNull public @NotNull ImmutableRequirement.MatchType getTypeOfMatch()
- Specified by:
getTypeOfMatch
in interfaceImmutableRequirement
- Returns:
- representing the type of match
-
isReadonly
public Boolean isReadonly()
Description copied from interface:ImmutableRequirement
If a requirement is readonly, it cannot be removed through the UI (the backend can do what it wants, however)- Specified by:
isReadonly
in interfaceImmutableRequirement
- Returns:
- true if the requirement cannot be removed or edited via the UI.
-
getOwnerId
public long getOwnerId()
Description copied from interface:ImmutableRequirement
The identifier of thisRequirement
that is used to identify it uniquely for allRequirement
s created byImmutableRequirement.getPluginModuleKey()
- Specified by:
getOwnerId
in interfaceImmutableRequirement
- Returns:
- ownerId
-
getPluginModuleKey
@Nullable public @Nullable String getPluginModuleKey()
Description copied from interface:ImmutableRequirement
TheModuleDescriptor.getKey()
that is responsible for the Lifecycle of thisRequirement
- Specified by:
getPluginModuleKey
in interfaceImmutableRequirement
- Returns:
- pluginKey
-
getOwnerName
@Nullable public @Nullable String getOwnerName()
- Specified by:
getOwnerName
in interfaceRequirementDetails
- Returns:
- The name of the task that owns this requirement
-
getMatchingAgents
public Integer getMatchingAgents()
Description copied from interface:RequirementDetails
Number of non-elastic agents that match this requirement- Specified by:
getMatchingAgents
in interfaceRequirementDetails
- Returns:
-
getMatchingImages
public Integer getMatchingImages()
Description copied from interface:RequirementDetails
Number of elastic images that match this requirement- Specified by:
getMatchingImages
in interfaceRequirementDetails
- Returns:
-
getMatchingEphemeralAgentTemplates
public Integer getMatchingEphemeralAgentTemplates()
Description copied from interface:RequirementDetails
Number of ephemeral agent templates that match this requirement- Specified by:
getMatchingEphemeralAgentTemplates
in interfaceRequirementDetails
- Returns:
-
isRegexMatch
public boolean isRegexMatch()
Description copied from interface:ImmutableRequirement
Is this a regex match requirement or exact match requirement.- Specified by:
isRegexMatch
in interfaceImmutableRequirement
- Returns:
-
-