Interface CapabilitySet
- All Superinterfaces:
BambooIdProvider
,BambooObject
,ReadOnlyCapabilitySet
,Serializable
- All Known Subinterfaces:
EphemeralAgentTemplateCapabilitySet
,ImageCapabilitySet
- All Known Implementing Classes:
CapabilitySetImpl
,EphemeralAgentTemplateCapabilitySetImpl
,ImageCapabilitySetImpl
,LocalCapabilitySet
,RemoteCapabilitySet
Interface representing a set of capabilities for a build agent.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCapability
(@NotNull Capability capability) Adds a capability to the set.void
addCapability
(@NotNull Capability capability, boolean overwrite) Adds a capability to the set.@NotNull CapabilityScope
Returns the scope of the capability set.@Nullable String
Returns the identifier describing the type of this capability set.@Nullable String
Returns the identifier for the set if it is shared.void
Removes all capabilities from the set.void
removeCapability
(@NotNull String key) Removes a capability from the set by its key.void
setCapabilities
(Set<Capability> capabilities) Sets the capabilities of the set.Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
Methods inherited from interface com.atlassian.bamboo.v2.build.agent.capability.ReadOnlyCapabilitySet
getCapabilities, getCapability
-
Method Details
-
addCapability
Adds a capability to the set. Will overwrite any existing capability with the same key.- Parameters:
capability
- the capability to add
-
addCapability
Adds a capability to the set. If overwrite is false, the new value will be rejected if a capability with the same key already exists.- Parameters:
capability
- the capability to addoverwrite
- whether to overwrite an existing capability with the same key
-
removeCapability
Removes a capability from the set by its key.- Parameters:
key
- the key of the capability to remove
-
removeAllCapabilities
void removeAllCapabilities()Removes all capabilities from the set. -
setCapabilities
Sets the capabilities of the set.- Parameters:
capabilities
- the set of capabilities to set
-
getCapabilityScope
Returns the scope of the capability set. Can either beCapabilityScope.AGENT
- only applies to one agent, orCapabilityScope.SHARED
- shared across all local or all remote agents.- Returns:
- the scope of the capability set
-
getCapabilitySetType
Returns the identifier describing the type of this capability set.- Returns:
- "Local", "Remote" or "Image"
-