Class RequirementImpl
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.v2.build.agent.capability.RequirementImpl
- All Implemented Interfaces:
BambooIdProvider
,BambooObject
,Requirement
,ImmutableRequirement
,Cloneable
- Direct Known Subclasses:
AgentAssignmentRequirement
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.v2.build.requirement.ImmutableRequirement
ImmutableRequirement.MatchType
-
Field Summary
Fields inherited from interface com.atlassian.bamboo.v2.build.agent.capability.Requirement
EQUALS, EXISTS, REGEX
-
Constructor Summary
ConstructorDescriptionRequirementImpl
(@NotNull Requirement requirement) RequirementImpl
(String key, boolean regexMatch, String match) RequirementImpl
(String key, boolean regexMatch, String match, boolean readonly) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
boolean
@NotNull String
getKey()
Represents the requirement.A match requirement value.long
The identifier of thisRequirement
that is used to identify it uniquely for allRequirement
s created byImmutableRequirement.getPluginModuleKey()
TheModuleDescriptor.getKey()
that is responsible for the Lifecycle of thisRequirement
@NotNull ImmutableRequirement.MatchType
int
hashCode()
If a requirement is readonly, it cannot be removed through the UI (the backend can do what it wants, however)boolean
Is this a regex match requirement or exact match requirement.boolean
Is this a system requirement? System requirements are builder/jdk requirements which cannot be removed from the plan.void
void
setMatchValue
(String matchValue) void
setOwnerId
(long uniqueIdentifier) void
setPluginModuleKey
(String pluginModuleKey) void
setReadonly
(Boolean readonly) void
setRegexMatch
(Boolean regexMatch) void
setRequirementSet
(RequirementSet requirementSet) toString()
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Constructor Details
-
RequirementImpl
public RequirementImpl() -
RequirementImpl
-
RequirementImpl
-
RequirementImpl
-
-
Method Details
-
isSystemRequirement
public boolean isSystemRequirement()Description copied from interface:Requirement
Is this a system requirement? System requirements are builder/jdk requirements which cannot be removed from the plan.- Specified by:
isSystemRequirement
in interfaceRequirement
- Returns:
-
getKey
Description copied from interface:ImmutableRequirement
Represents the requirement. Must match exactly to theCapability
getKey().- Specified by:
getKey
in interfaceImmutableRequirement
- Returns:
-
setKey
- Specified by:
setKey
in interfaceRequirement
-
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.
-
setMatchValue
-
isRegexMatch
public boolean isRegexMatch()Description copied from interface:Requirement
Is this a regex match requirement or exact match requirement.- Specified by:
isRegexMatch
in interfaceImmutableRequirement
- Specified by:
isRegexMatch
in interfaceRequirement
- Returns:
-
setRegexMatch
-
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.
-
setReadonly
- Specified by:
setReadonly
in interfaceRequirement
-
getRequirementSet
- Specified by:
getRequirementSet
in interfaceRequirement
- Returns:
- requirementSet that this
Requirement
is linked to
-
setRequirementSet
- Specified by:
setRequirementSet
in interfaceRequirement
-
getTypeOfMatch
- Specified by:
getTypeOfMatch
in interfaceImmutableRequirement
- Returns:
- representing the type of match
-
getPluginModuleKey
Description copied from interface:ImmutableRequirement
TheModuleDescriptor.getKey()
that is responsible for the Lifecycle of thisRequirement
- Specified by:
getPluginModuleKey
in interfaceImmutableRequirement
- Returns:
- pluginKey
-
setPluginModuleKey
- Specified by:
setPluginModuleKey
in interfaceRequirement
-
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
-
setOwnerId
public void setOwnerId(long uniqueIdentifier) - Specified by:
setOwnerId
in interfaceRequirement
-
belongsToPlugin
public boolean belongsToPlugin()- Specified by:
belongsToPlugin
in interfaceRequirement
- Returns:
- true if this
Requirement
belongs to a plugin
-
toString
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
equals
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
compareTo
-