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 TypeMethodDescriptionvoidaddCapability(@NotNull Capability capability) Adds a capability to the set.voidaddCapability(@NotNull Capability capability, boolean overwrite) Adds a capability to the set.@NotNull CapabilityScopeReturns the scope of the capability set.@Nullable StringReturns the identifier describing the type of this capability set.@Nullable StringReturns the identifier for the set if it is shared.voidRemoves all capabilities from the set.voidremoveCapability(@NotNull String key) Removes a capability from the set by its key.voidsetCapabilities(Set<Capability> capabilities) Sets the capabilities of the set.Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getIdMethods inherited from interface com.atlassian.bamboo.core.BambooObject
setIdMethods 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"
-