com.atlassian.bamboo.plan
Class PlanExecutableAgentsHelperImpl

java.lang.Object
  extended by com.atlassian.bamboo.plan.PlanExecutableAgentsHelperImpl
All Implemented Interfaces:
PlanExecutableAgentsHelper

public class PlanExecutableAgentsHelperImpl
extends java.lang.Object
implements PlanExecutableAgentsHelper


Constructor Summary
PlanExecutableAgentsHelperImpl(PlanManager planManager, ExecutionStatusProvider executionStatusProvider, AgentManager agentManager, com.atlassian.plugin.PluginAccessor pluginAccessor)
           
 
Method Summary
 java.util.Collection<BuildAgent> getExecutableAgentsForPlan(Buildable buildable, BuildContext buildContext)
          Calculates the list of active agents that can build a Buildable plan based on Requirements and criteria defined in plugins.
 java.util.Collection<ElasticImageConfiguration> getExecutableImagesForPlan(Buildable buildable)
          Calculates the list of elastic images that are capable of running an agent that can build a Buildable plan.
 boolean planHasExecutableAgents(PlanKey planKey, boolean includeDisabled)
          Checks if a Buildable can be built on any active agent.
 boolean planHasExecutableAgents(PlanResultKey planResultKey)
          Checks if a Job can be built on any active agent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanExecutableAgentsHelperImpl

public PlanExecutableAgentsHelperImpl(PlanManager planManager,
                                      ExecutionStatusProvider executionStatusProvider,
                                      AgentManager agentManager,
                                      com.atlassian.plugin.PluginAccessor pluginAccessor)
Method Detail

getExecutableAgentsForPlan

public java.util.Collection<BuildAgent> getExecutableAgentsForPlan(@NotNull
                                                                   Buildable buildable,
                                                                   @NotNull
                                                                   BuildContext buildContext)
Description copied from interface: PlanExecutableAgentsHelper
Calculates the list of active agents that can build a Buildable plan based on Requirements and criteria defined in plugins.

Specified by:
getExecutableAgentsForPlan in interface PlanExecutableAgentsHelper
Returns:

getExecutableImagesForPlan

public java.util.Collection<ElasticImageConfiguration> getExecutableImagesForPlan(@NotNull
                                                                                  Buildable buildable)
Description copied from interface: PlanExecutableAgentsHelper
Calculates the list of elastic images that are capable of running an agent that can build a Buildable plan.

Specified by:
getExecutableImagesForPlan in interface PlanExecutableAgentsHelper
Returns:

planHasExecutableAgents

public boolean planHasExecutableAgents(@NotNull
                                       PlanKey planKey,
                                       boolean includeDisabled)
Checks if a Buildable can be built on any active agent. This implementation utilises information already available in ExecutionStatus if it exists.

Specified by:
planHasExecutableAgents in interface PlanExecutableAgentsHelper
Parameters:
planKey -
includeDisabled - indicate whether disabled agents should be included in checking
Returns:

planHasExecutableAgents

public boolean planHasExecutableAgents(@NotNull
                                       PlanResultKey planResultKey)
Checks if a Job can be built on any active agent. This implementation utilises information already available in ExecutionStatus if it exists.

Specified by:
planHasExecutableAgents in interface PlanExecutableAgentsHelper
Parameters:
planResultKey -
Returns:


Copyright © 2012 Atlassian. All Rights Reserved.