Class CapabilityImpl
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.core.BambooEntityObject
-
- com.atlassian.bamboo.v2.build.agent.capability.CapabilityImpl
-
- All Implemented Interfaces:
BambooIdProvider
,BambooObject
,Capability
,Serializable
,Cloneable
@Entity public class CapabilityImpl extends BambooEntityObject implements Capability
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.v2.build.agent.capability.Capability
SYSTEM_PREFIX
-
-
Constructor Summary
Constructors Constructor Description CapabilityImpl()
CapabilityImpl(@NotNull String key, @Nullable String value)
CapabilityImpl(@NotNull String key, @Nullable String value, @Nullable CapabilitySource capabilitySource)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Object obj)
static Capability
copy(Capability capability)
void
copySourceFrom(Capability other)
void
copyValueFrom(Capability other)
boolean
equals(Object o)
CapabilitySet
getCapabilitySet()
@Nullable CapabilitySource
getCapabilitySource()
Get source in which the ability is definedInteger
getCapabilitySourceMask()
@NotNull String
getKey()
Get the key representing the capability@Nullable String
getValue()
A value of the capability property.@NotNull String
getValueWithDefault()
A null-safe getter of value of the capability property.int
hashCode()
void
setCapabilitySet(CapabilitySet capabilitySet)
void
setCapabilitySource(@Nullable CapabilitySource capabilitySourceMask)
void
setCapabilitySourceMask(Integer capabilitySourceMask)
void
setKey(@NotNull String key)
void
setValue(@Nullable String value)
String
toString()
static String
toStringWithCustomValue(@NotNull String key, @Nullable String value, @Nullable CapabilitySource capabilitySource)
-
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
-
CapabilityImpl
public CapabilityImpl()
-
CapabilityImpl
public CapabilityImpl(@NotNull @NotNull String key, @Nullable @Nullable String value)
-
CapabilityImpl
public CapabilityImpl(@NotNull @NotNull String key, @Nullable @Nullable String value, @Nullable @Nullable CapabilitySource capabilitySource)
-
-
Method Detail
-
getKey
@NotNull public @NotNull String getKey()
Description copied from interface:Capability
Get the key representing the capability- Specified by:
getKey
in interfaceCapability
-
setKey
public void setKey(@NotNull @NotNull String key)
- Specified by:
setKey
in interfaceCapability
-
getValue
@Nullable public @Nullable String getValue()
Description copied from interface:Capability
A value of the capability property. For matching toRequirement
- Specified by:
getValue
in interfaceCapability
-
getValueWithDefault
@NotNull public @NotNull String getValueWithDefault()
Description copied from interface:Capability
A null-safe getter of value of the capability property. For matching toRequirement
- Specified by:
getValueWithDefault
in interfaceCapability
- Returns:
- value or empty string if value is null
-
setValue
public void setValue(@Nullable @Nullable String value)
- Specified by:
setValue
in interfaceCapability
-
getCapabilitySourceMask
public Integer getCapabilitySourceMask()
-
setCapabilitySourceMask
public void setCapabilitySourceMask(Integer capabilitySourceMask)
-
getCapabilitySource
@Nullable public @Nullable CapabilitySource getCapabilitySource()
Description copied from interface:Capability
Get source in which the ability is defined- Specified by:
getCapabilitySource
in interfaceCapability
-
setCapabilitySource
public void setCapabilitySource(@Nullable @Nullable CapabilitySource capabilitySourceMask)
- Specified by:
setCapabilitySource
in interfaceCapability
-
getCapabilitySet
public CapabilitySet getCapabilitySet()
- Specified by:
getCapabilitySet
in interfaceCapability
-
setCapabilitySet
public void setCapabilitySet(CapabilitySet capabilitySet)
- Specified by:
setCapabilitySet
in interfaceCapability
-
copyValueFrom
public void copyValueFrom(Capability other)
- Specified by:
copyValueFrom
in interfaceCapability
-
copySourceFrom
public void copySourceFrom(Capability other)
- Specified by:
copySourceFrom
in interfaceCapability
-
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)
-
toStringWithCustomValue
public static String toStringWithCustomValue(@NotNull @NotNull String key, @Nullable @Nullable String value, @Nullable @Nullable CapabilitySource capabilitySource)
-
copy
public static Capability copy(Capability capability)
-
-