com.atlassian.bamboo.v2.build.agent.capability
Class RequirementImpl

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.v2.build.agent.capability.RequirementImpl
All Implemented Interfaces:
BambooIdProvider, BambooObject, Requirement, java.lang.Cloneable
Direct Known Subclasses:
AgentAssignmentRequirement

public class RequirementImpl
extends BambooEntityObject
implements Requirement


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Fields inherited from interface com.atlassian.bamboo.v2.build.agent.capability.Requirement
EQUALS, EXISTS, REGEX
 
Constructor Summary
RequirementImpl()
           
RequirementImpl(Requirement requirement)
           
RequirementImpl(java.lang.String key, boolean regexMatch, java.lang.String match)
           
RequirementImpl(java.lang.String key, boolean regexMatch, java.lang.String match, boolean readonly)
           
 
Method Summary
 boolean belongsToPlugin()
           
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object o)
          This method needs to be here in order to use proper id
 java.lang.String getKey()
          Represents the requirement.
 java.lang.String getMatchType()
           
 java.lang.String getMatchValue()
          A match requirement value.
 long getOwnerId()
          The identifier of this Requirement that is used to identify it uniquely for all Requirements created by Requirement.getPluginModuleKey()
 java.lang.String getPluginModuleKey()
          The ModuleDescriptor.getKey() that is responsible for the Lifecycle of this Requirement
 RequirementSet getRequirementSet()
           
 int hashCode()
          This method needs to be here in order to use proper id
 java.lang.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(java.lang.String key)
           
 void setMatchValue(java.lang.String matchValue)
           
 void setOwnerId(long uniqueIdentifier)
           
 void setPluginModuleKey(java.lang.String pluginModuleKey)
           
 void setReadonly(java.lang.Boolean readonly)
           
 void setRegexMatch(java.lang.Boolean regexMatch)
           
 void setRequirementSet(RequirementSet requirementSet)
           
 java.lang.String toString()
           
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
getId, setId
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 

Constructor Detail

RequirementImpl

public RequirementImpl()

RequirementImpl

public RequirementImpl(java.lang.String key,
                       boolean regexMatch,
                       java.lang.String match)

RequirementImpl

public RequirementImpl(java.lang.String key,
                       boolean regexMatch,
                       java.lang.String match,
                       boolean readonly)

RequirementImpl

public RequirementImpl(@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 interface Requirement
Returns:

getKey

@NotNull
public java.lang.String getKey()
Description copied from interface: Requirement
Represents the requirement. Must match exactly to the Capability getKey().

Specified by:
getKey in interface Requirement
Returns:

setKey

public void setKey(java.lang.String key)
Specified by:
setKey in interface Requirement

getMatchValue

public java.lang.String getMatchValue()
Description copied from interface: Requirement
A match requirement value. The regex must match the Capability value.

Specified by:
getMatchValue in interface Requirement
Returns:

setMatchValue

public void setMatchValue(java.lang.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 interface Requirement
Returns:

setRegexMatch

public void setRegexMatch(java.lang.Boolean regexMatch)

isReadonly

public java.lang.Boolean isReadonly()
Description copied from interface: Requirement
If a requirement is readonly, it cannot be removed through the UI (the backend can do what it wants, however)

Specified by:
isReadonly in interface Requirement
Returns:

setReadonly

public void setReadonly(java.lang.Boolean readonly)
Specified by:
setReadonly in interface Requirement

getRequirementSet

public RequirementSet getRequirementSet()
Specified by:
getRequirementSet in interface Requirement
Returns:
requirementSet that this Requirement is linked to

setRequirementSet

public void setRequirementSet(RequirementSet requirementSet)
Specified by:
setRequirementSet in interface Requirement

getMatchType

public java.lang.String getMatchType()
Specified by:
getMatchType in interface Requirement

getPluginModuleKey

public java.lang.String getPluginModuleKey()
Description copied from interface: Requirement
The ModuleDescriptor.getKey() that is responsible for the Lifecycle of this Requirement

Specified by:
getPluginModuleKey in interface Requirement
Returns:
pluginKey

setPluginModuleKey

public void setPluginModuleKey(java.lang.String pluginModuleKey)
Specified by:
setPluginModuleKey in interface Requirement

getOwnerId

public long getOwnerId()
Description copied from interface: Requirement
The identifier of this Requirement that is used to identify it uniquely for all Requirements created by Requirement.getPluginModuleKey()

Specified by:
getOwnerId in interface Requirement
Returns:
ownerId

setOwnerId

public void setOwnerId(long uniqueIdentifier)
Specified by:
setOwnerId in interface Requirement

belongsToPlugin

public boolean belongsToPlugin()
Specified by:
belongsToPlugin in interface Requirement
Returns:
true if this Requirement belongs to a plugin

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Description copied from class: BambooEntityObject
This method needs to be here in order to use proper id

Overrides:
hashCode in class BambooEntityObject

equals

public boolean equals(java.lang.Object o)
Description copied from class: BambooEntityObject
This method needs to be here in order to use proper id

Overrides:
equals in class BambooEntityObject

compareTo

public int compareTo(java.lang.Object obj)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.