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
Interface representing a set of capabilities for a build agent.
  • Method Details

    • addCapability

      void addCapability(@NotNull @NotNull Capability capability)
      Adds a capability to the set. Will overwrite any existing capability with the same key.
      Parameters:
      capability - the capability to add
    • addCapability

      void addCapability(@NotNull @NotNull Capability capability, boolean overwrite)
      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 add
      overwrite - whether to overwrite an existing capability with the same key
    • removeCapability

      void removeCapability(@NotNull @NotNull String key)
      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

      void setCapabilities(Set<Capability> capabilities)
      Sets the capabilities of the set.
      Parameters:
      capabilities - the set of capabilities to set
    • getCapabilityScope

      @NotNull @NotNull CapabilityScope getCapabilityScope()
      Returns the scope of the capability set. Can either be CapabilityScope.AGENT - only applies to one agent, or CapabilityScope.SHARED - shared across all local or all remote agents.
      Returns:
      the scope of the capability set
    • getSharedCapabilitySetType

      @Nullable @Nullable String getSharedCapabilitySetType()
      Returns the identifier for the set if it is shared. Used primarily in the UI.
      Returns:
      "Local", "Remote" or null if not a shared capability type
    • getCapabilitySetType

      @Nullable @Nullable String getCapabilitySetType()
      Returns the identifier describing the type of this capability set.
      Returns:
      "Local", "Remote" or "Image"