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
@Entity public class RequirementImpl extends BambooEntityObject implements Requirement
-
-
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
Constructors Constructor Description RequirementImpl()
RequirementImpl(@NotNull Requirement requirement)
RequirementImpl(String key, boolean regexMatch, String match)
RequirementImpl(String key, boolean regexMatch, String match, boolean readonly)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
belongsToPlugin()
int
compareTo(Object obj)
boolean
equals(Object o)
@NotNull String
getKey()
Represents the requirement.String
getMatchType()
String representation of the type of match the requirement needs.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()
String
getPluginModuleKey()
TheModuleDescriptor.getKey()
that is responsible for the Lifecycle of thisRequirement
RequirementSet
getRequirementSet()
@NotNull ImmutableRequirement.MatchType
getTypeOfMatch()
int
hashCode()
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.boolean
isSystemRequirement()
Is this a system requirement? System requirements are builder/jdk requirements which cannot be removed from the plan.void
setKey(String key)
void
setMatchValue(String matchValue)
void
setOwnerId(long uniqueIdentifier)
void
setPluginModuleKey(String pluginModuleKey)
void
setReadonly(Boolean readonly)
void
setRegexMatch(Boolean regexMatch)
void
setRequirementSet(RequirementSet requirementSet)
String
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 Detail
-
RequirementImpl
public RequirementImpl()
-
RequirementImpl
public RequirementImpl(String key, boolean regexMatch, String match, boolean readonly)
-
RequirementImpl
public RequirementImpl(@NotNull @NotNull Requirement requirement)
-
-
Method Detail
-
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
@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:
-
setKey
public void setKey(String key)
- Specified by:
setKey
in interfaceRequirement
-
getMatchValue
public 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.
-
setMatchValue
public void setMatchValue(String matchValue)
-
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
public void setRegexMatch(Boolean regexMatch)
-
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.
-
setReadonly
public void setReadonly(Boolean readonly)
- Specified by:
setReadonly
in interfaceRequirement
-
getRequirementSet
public RequirementSet getRequirementSet()
- Specified by:
getRequirementSet
in interfaceRequirement
- Returns:
- requirementSet that this
Requirement
is linked to
-
setRequirementSet
public void setRequirementSet(RequirementSet requirementSet)
- Specified by:
setRequirementSet
in interfaceRequirement
-
getMatchType
public String getMatchType()
Description copied from interface:Requirement
String representation of the type of match the requirement needs. This us representitive of what the users see in the UI.- Specified by:
getMatchType
in interfaceRequirement
- Returns:
-
getTypeOfMatch
@NotNull public @NotNull ImmutableRequirement.MatchType getTypeOfMatch()
- Specified by:
getTypeOfMatch
in interfaceImmutableRequirement
- Returns:
- representing the type of match
-
getPluginModuleKey
public String getPluginModuleKey()
Description copied from interface:ImmutableRequirement
TheModuleDescriptor.getKey()
that is responsible for the Lifecycle of thisRequirement
- Specified by:
getPluginModuleKey
in interfaceImmutableRequirement
- Returns:
- pluginKey
-
setPluginModuleKey
public void setPluginModuleKey(String pluginModuleKey)
- 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
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
compareTo
public int compareTo(Object obj)
-
-