com.atlassian.bamboo.v2.build.agent.capability
Interface CapabilitySetManager

All Known Implementing Classes:
CapabilitySetManagerImpl

public interface CapabilitySetManager


Method Summary
 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
 java.util.List<java.lang.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)
           
 java.util.Collection<Buildable> getExecutableBuildables(ReadOnlyCapabilitySet capabilitySet)
          Collection of buildables for which this capability set can meet the requirements of
 java.util.Collection<Build> getExecutableBuilds(ReadOnlyCapabilitySet capabilitySet)
          Deprecated. since 2.7 use getExecutableBuildables
 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
 java.util.Collection<Capability> getSystemCapabilities(java.lang.String type)
          Collection of Capability which have keys prefixed with system.{type} Used to identify Bamboo system capabilities for Builders / JDKs.
 java.util.Collection<Capability> getSystemCapabilitiesByKey(java.lang.String selectedCapabilityKey)
          Collection of Capability which have the specified key
 java.util.Collection<java.lang.String> getSystemCapabilityKeys(java.lang.String type, boolean isElasticEnabled)
          Returns a list of Capability Keys that match the given type
 void saveCapabilitySet(CapabilitySet capabilitySet)
          Saves a capability set
 

Method Detail

getSharedLocalCapabilitySet

CapabilitySet getSharedLocalCapabilitySet()
Gets the locally shared capabilities

Returns:
CapabilitySet

getSharedRemoteCapabilitySet

CapabilitySet getSharedRemoteCapabilitySet()
Gets the remotely shared capabilities

Returns:
CapabilitySet

getSharedCapabilitySet

@Nullable
CapabilitySet getSharedCapabilitySet(@NotNull
                                              CapabilitySet agentCapabilitySet)
Gets the shared capabilities depending on agentCapability type.

Parameters:
agentCapabilitySet -
Returns:
shared capability set, null if neither Local nor Remote capability set passed as parameter

saveCapabilitySet

void saveCapabilitySet(@NotNull
                       CapabilitySet capabilitySet)
Saves a capability set

Parameters:
capabilitySet -

createAgentCapabilitySet

@NotNull
CapabilitySet createAgentCapabilitySet(@NotNull
                                               LocalAgentDefinition pipelineDefinition)
Create an agent scope capability set for local agents

Parameters:
pipelineDefinition -
Returns:

createAgentCapabilitySet

@NotNull
CapabilitySet createAgentCapabilitySet(@NotNull
                                               RemoteAgentDefinition pipelineDefinition)
Create an agent scope capability set for remote agents

Parameters:
pipelineDefinition -
Returns:

getCombinedCapabilitySet

@NotNull
ReadOnlyCapabilitySet getCombinedCapabilitySet(@NotNull
                                                       CapabilitySet agentCapabilitySet)
Gets a combined "effective" capabilitySet given an agent's capabilitySet. Will retrieve the shared capabilitySet for the agent based on the CapabilityScope. The agent capabilitySet will override capabilities in the CapabilityScope.SHARED capabilities if there's a precise key match.

Parameters:
agentCapabilitySet -
Returns:

getCombinedCapabilitySet

ReadOnlyCapabilitySet getCombinedCapabilitySet(@NotNull
                                               CapabilitySet agentCapabilitySet,
                                               @Nullable
                                               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.

Parameters:
agentCapabilitySet -
sharedCapabilitySet -
Returns:

getCombinedCapabilitySet

@Nullable
ReadOnlyCapabilitySet getCombinedCapabilitySet(long agentId)
Gets the ReadOnlyCapabilitySet for the agent.

Parameters:
agentId -
Returns:

getSystemCapabilityKeys

@NotNull
java.util.Collection<java.lang.String> getSystemCapabilityKeys(@NotNull
                                                                       java.lang.String type,
                                                                       boolean isElasticEnabled)
Returns a list of Capability Keys that match the given type

Parameters:
type - eg "builder" or "jdk"
Returns:
list of capability keys eg. "system.builder.mvn2.Maven 2"

getSystemCapabilities

@NotNull
java.util.Collection<Capability> getSystemCapabilities(@NotNull
                                                               java.lang.String type)
Collection of Capability which have keys prefixed with system.{type} Used to identify Bamboo system capabilities for Builders / JDKs.

Parameters:
type -
Returns:

getSystemCapabilitiesByKey

@NotNull
java.util.Collection<Capability> getSystemCapabilitiesByKey(@NotNull
                                                                    java.lang.String selectedCapabilityKey)
Collection of Capability which have the specified key

Parameters:
selectedCapabilityKey -
Returns:

getExecutableBuilds

@Deprecated
@NotNull
java.util.Collection<Build> getExecutableBuilds(@NotNull
                                                                   ReadOnlyCapabilitySet capabilitySet)
Deprecated. since 2.7 use getExecutableBuildables

Collection of builds for which this capability set can meet the requirements of

Parameters:
capabilitySet -
Returns:

getExecutableBuildables

@NotNull
java.util.Collection<Buildable> getExecutableBuildables(@NotNull
                                                                ReadOnlyCapabilitySet capabilitySet)
Collection of buildables for which this capability set can meet the requirements of

Parameters:
capabilitySet -
Returns:

findUniqueCapabilityKeys

@NotNull
java.util.List<java.lang.String> findUniqueCapabilityKeys()
Finds all the distinct capability keys

Returns:

getPipelineDefinition

@Nullable
PipelineDefinition getPipelineDefinition(@NotNull
                                                  CapabilitySet capabilitySet)

getElasticImage

@Nullable
ElasticImageConfiguration getElasticImage(@NotNull
                                                   CapabilitySet capabilitySet)


Copyright © 2010 Atlassian. All Rights Reserved.