Interface CapabilitySet
-
- All Superinterfaces:
BambooIdProvider,BambooObject,ReadOnlyCapabilitySet,Serializable
- All Known Subinterfaces:
EphemeralAgentTemplateCapabilitySet,ImageCapabilitySet
- All Known Implementing Classes:
CapabilitySetImpl,EphemeralAgentTemplateCapabilitySetImpl,ImageCapabilitySetImpl,LocalCapabilitySet,RemoteCapabilitySet
public interface CapabilitySet extends ReadOnlyCapabilitySet, BambooObject, Serializable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCapability(@NotNull Capability capability)Add a capability to the set.voidaddCapability(@NotNull Capability capability, boolean overwrite)Adds a capability.@NotNull CapabilityScopegetCapabilityScope()The scope of the capability set.@Nullable StringgetCapabilitySetType()Returns the identifier describing the type of this capability.@Nullable StringgetSharedCapabilitySetType()Returns the identifier for the set if it is shared.voidremoveCapability(@NotNull String key)Remove a capability from the set, by the key.voidsetCapabilities(Set<Capability> capabilities)-
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 Detail
-
addCapability
void addCapability(@NotNull @NotNull Capability capability)Add a capability to the set. Will overwrite any existing capability key- Parameters:
capability-
-
addCapability
void addCapability(@NotNull @NotNull Capability capability, boolean overwrite)Adds a capability. If overwrite is false the new value will be rejected- Parameters:
capability-overwrite-
-
removeCapability
void removeCapability(@NotNull @NotNull String key)Remove a capability from the set, by the key.- Parameters:
key-
-
setCapabilities
void setCapabilities(Set<Capability> capabilities)
-
getCapabilityScope
@NotNull @NotNull CapabilityScope getCapabilityScope()
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:
CapabilityScope
-
getSharedCapabilitySetType
@Nullable @Nullable String getSharedCapabilitySetType()
Returns the identifier for the set if it is shared. Pretty used exclusively in the UI.- Returns:
- "Local", "Remote" or null it not a shared capability type;
-
getCapabilitySetType
@Nullable @Nullable String getCapabilitySetType()
Returns the identifier describing the type of this capability.- Returns:
- "Local", "Remote" or "Image"
-
-