public class CapabilitySetManagerImpl extends Object implements CapabilitySetManager
Constructor and Description |
---|
CapabilitySetManagerImpl() |
Modifier and Type | Method and Description |
---|---|
CapabilitySet |
createAgentCapabilitySet(LocalAgentDefinition pipelineDefinition)
Create an agent scope capability set for local agents
|
CapabilitySet |
createAgentCapabilitySet(RemoteAgentDefinition pipelineDefinition)
Create an agent scope capability set for remote agents
|
List<String> |
findUniqueCapabilityKeys()
Finds all the distinct capability keys
|
ReadOnlyCapabilitySet |
getCombinedCapabilitySet(CapabilitySet agentCapabilitySet)
Gets a combined "effective" capabilitySet given an agent's capabilitySet.
|
ReadOnlyCapabilitySet |
getCombinedCapabilitySet(CapabilitySet agentCapabilitySet,
CapabilitySet sharedCapabilitySet)
Gets a combined "effective" capabilitySet given an agent's capability set and a shared capability set
The agent capabilitySet will override capabilities in the
CapabilityScope.SHARED capabilities if there's
a precise key match. |
ReadOnlyCapabilitySet |
getCombinedCapabilitySet(long agentId)
Gets the
ReadOnlyCapabilitySet for the agent. |
ElasticImageConfiguration |
getElasticImage(CapabilitySet capabilitySet) |
PipelineDefinition |
getPipelineDefinition(CapabilitySet capabilitySet) |
CapabilitySet |
getSharedCapabilitySet(CapabilitySet agentCapabilitySet)
Gets the shared capabilities depending on agentCapability type.
|
CapabilitySet |
getSharedLocalCapabilitySet()
Gets the locally shared capabilities
|
CapabilitySet |
getSharedRemoteCapabilitySet()
Gets the remotely shared capabilities
|
Collection<Capability> |
getSystemCapabilities(String type)
Collection of
Capability which have keys prefixed with system.{type}
Used to identify Bamboo system capabilities for Builders / JDKs. |
Collection<Capability> |
getSystemCapabilitiesByKey(String key)
Collection of
Capability which have the specified key |
Collection<String> |
getSystemCapabilityKeys(String type,
boolean isElasticEnabled)
Returns a list of Capability Keys that match the given type
|
void |
saveCapabilitySet(CapabilitySet capabilitySet)
Saves a capability set
|
@Nullable public CapabilitySet getSharedLocalCapabilitySet()
RemotedCapabilitySetManager
getSharedLocalCapabilitySet
in interface RemotedCapabilitySetManager
CapabilitySet
public CapabilitySet getSharedRemoteCapabilitySet()
CapabilitySetManager
getSharedRemoteCapabilitySet
in interface CapabilitySetManager
CapabilitySet
@Nullable public CapabilitySet getSharedCapabilitySet(@NotNull CapabilitySet agentCapabilitySet)
CapabilitySetManager
getSharedCapabilitySet
in interface CapabilitySetManager
@Nullable public PipelineDefinition getPipelineDefinition(@NotNull CapabilitySet capabilitySet)
getPipelineDefinition
in interface CapabilitySetManager
@Nullable public ElasticImageConfiguration getElasticImage(@NotNull CapabilitySet capabilitySet)
getElasticImage
in interface CapabilitySetManager
@NotNull public ReadOnlyCapabilitySet getCombinedCapabilitySet(@NotNull CapabilitySet agentCapabilitySet)
CapabilitySetManager
CapabilityScope
.
The agent capabilitySet will override capabilities in the CapabilityScope.SHARED
capabilities if there's
a precise key match.getCombinedCapabilitySet
in interface CapabilitySetManager
public ReadOnlyCapabilitySet getCombinedCapabilitySet(@NotNull CapabilitySet agentCapabilitySet, @Nullable CapabilitySet sharedCapabilitySet)
CapabilitySetManager
CapabilityScope.SHARED
capabilities if there's
a precise key match.getCombinedCapabilitySet
in interface CapabilitySetManager
@Nullable public ReadOnlyCapabilitySet getCombinedCapabilitySet(long agentId)
RemotedCapabilitySetManager
ReadOnlyCapabilitySet
for the agent.getCombinedCapabilitySet
in interface RemotedCapabilitySetManager
@NotNull public CapabilitySet createAgentCapabilitySet(@NotNull LocalAgentDefinition pipelineDefinition)
CapabilitySetManager
createAgentCapabilitySet
in interface CapabilitySetManager
@NotNull public CapabilitySet createAgentCapabilitySet(@NotNull RemoteAgentDefinition pipelineDefinition)
CapabilitySetManager
createAgentCapabilitySet
in interface CapabilitySetManager
public void saveCapabilitySet(@NotNull CapabilitySet capabilitySet)
CapabilitySetManager
saveCapabilitySet
in interface CapabilitySetManager
@NotNull public Collection<String> getSystemCapabilityKeys(@NotNull String type, boolean isElasticEnabled)
CapabilitySetManager
getSystemCapabilityKeys
in interface CapabilitySetManager
type
- eg "builder" or "jdk"@NotNull public Collection<Capability> getSystemCapabilities(@NotNull String type)
CapabilitySetManager
Capability
which have keys prefixed with system.{type}
Used to identify Bamboo system capabilities for Builders / JDKs.getSystemCapabilities
in interface CapabilitySetManager
@NotNull public Collection<Capability> getSystemCapabilitiesByKey(@NotNull String key)
CapabilitySetManager
Capability
which have the specified keygetSystemCapabilitiesByKey
in interface CapabilitySetManager
@NotNull public List<String> findUniqueCapabilityKeys()
CapabilitySetManager
findUniqueCapabilityKeys
in interface CapabilitySetManager
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.