Class CapabilitySetImpl
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.v2.build.agent.capability.CapabilitySetImpl
- All Implemented Interfaces:
BambooIdProvider,BambooObject,CapabilitySet,ReadOnlyCapabilitySet,Serializable,Cloneable
- Direct Known Subclasses:
EphemeralAgentTemplateCapabilitySetImpl,ImageCapabilitySetImpl,LocalCapabilitySet,RemoteCapabilitySet
@NotThreadSafe
@Entity
public class CapabilitySetImpl
extends BambooEntityObject
implements CapabilitySet
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCapabilitySetImpl(CapabilityScope capabilityScope) CapabilitySetImpl(CapabilityScope capabilityScope, Capability... capabilities) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCapability(@NotNull Capability capability) Add a capability to the set.voidaddCapability(@NotNull Capability capability, boolean overwrite) Adds a capability.intboolean@NotNull Set<Capability>Get all the capabilities as a set@Nullable CapabilitygetCapability(@NotNull String key) Get the capability with the given key@NotNull CapabilityScopeThe scope of the capability set.Returns the identifier describing the type of this capability.@Nullable StringReturns the identifier for the set if it is shared.inthashCode()voidremoveCapability(@NotNull String key) Remove a capability from the set, by the key.voidsetCapabilities(Set<Capability> capabilities) voidsetCapabilityScope(CapabilityScope capabilityScope) toString()Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDateMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getIdMethods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Constructor Details
-
CapabilitySetImpl
public CapabilitySetImpl() -
CapabilitySetImpl
-
CapabilitySetImpl
-
-
Method Details
-
getCapability
Description copied from interface:ReadOnlyCapabilitySetGet the capability with the given key- Specified by:
getCapabilityin interfaceReadOnlyCapabilitySet- Returns:
-
getCapabilities
Description copied from interface:ReadOnlyCapabilitySetGet all the capabilities as a set- Specified by:
getCapabilitiesin interfaceReadOnlyCapabilitySet- Returns:
-
addCapability
Description copied from interface:CapabilitySetAdd a capability to the set. Will overwrite any existing capability key- Specified by:
addCapabilityin interfaceCapabilitySet
-
addCapability
Description copied from interface:CapabilitySetAdds a capability. If overwrite is false the new value will be rejected- Specified by:
addCapabilityin interfaceCapabilitySet
-
removeCapability
Description copied from interface:CapabilitySetRemove a capability from the set, by the key.- Specified by:
removeCapabilityin interfaceCapabilitySet
-
getCapabilityScope
Description copied from interface:CapabilitySetThe scope of the capability set. Can either beCapabilityScope.AGENT- only applies to one agent. orCapabilityScope.SHARED- shared across all local, or all remote agents.- Specified by:
getCapabilityScopein interfaceCapabilitySet- Returns:
CapabilityScope
-
getCapabilitySetType
Description copied from interface:CapabilitySetReturns the identifier describing the type of this capability.- Specified by:
getCapabilitySetTypein interfaceCapabilitySet- Returns:
- "Local", "Remote" or "Image"
-
setCapabilities
- Specified by:
setCapabilitiesin interfaceCapabilitySet
-
setCapabilityScope
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.atlassian.core.bean.EntityObject
-
equals
- Overrides:
equalsin classcom.atlassian.core.bean.EntityObject
-
compareTo
-
toString
-