com.atlassian.bamboo.plan
Interface PlanExecutionManager

All Superinterfaces:
ExecutionStatusProvider
All Known Implementing Classes:
PlanExecutionManagerImpl

public interface PlanExecutionManager
extends ExecutionStatusProvider

Generic Execution Manager for Plan's


Method Summary
 java.util.List<CurrentlyBuilding> getCurrentlyBuildingForPlan(PlanKey planKey)
          Returns all for specified PlanKey In case plan is a Chain instance, all currently running jobs will be returned
 java.util.List<CurrentlyBuilding> getCurrentlyBuildingForPlanResult(PlanResultKey planKey)
          Returns all CurrentlyBuilding for specified PlanResultKey In case plan is a Chain instance, all currently running jobs will be returned, however, chain itself will be not included in the list (effectively CurrentlyBuilding for all chain's children jobs will be returned)
 boolean isBuildingAllowed(Plan plan)
          Checks if a particular build is allowed to be built.
 boolean isBusy(PlanKey planKey)
          Tests if the Plan represented by PlanKey is busy starting
 ExecutionRequestResult start(Plan plan, BuildDetectionAction buildDetectionAction, AcquisitionPolicy acquisitionPolicy)
          Execute the Plan with the provided BuildDetectionAction and AcquisitionPolicy Calls to this method will acquire a lock according to the AcquisitionPolicy on a per Plan granularity
 ExecutionRequestResult startManualExecution(Plan plan, com.atlassian.user.User user)
          Attempts to start a manual execution of the given Plan
 ExecutionRequestResult startManualExecution(Plan Plan, com.atlassian.user.User user, java.util.Map<java.lang.String,java.lang.String> params)
          Attempts to start a manual execution of the given Plan
 void stopPlan(PlanKey planKey, boolean abandonResult, java.lang.String userName)
           
 void stopPlan(PlanResultKey planResultKey, boolean abandonResult, java.lang.String userName)
           
 
Methods inherited from interface com.atlassian.bamboo.plan.ExecutionStatusProvider
getExecutionStatus, getExecutionStatus, getJobExecution, numberOfExecutions
 

Method Detail

isBusy

boolean isBusy(@NotNull
               PlanKey planKey)
Tests if the Plan represented by PlanKey is busy starting

Parameters:
planKey -
Returns:
busy

start

@NotNull
ExecutionRequestResult start(@NotNull
                                     Plan plan,
                                     @NotNull
                                     BuildDetectionAction buildDetectionAction,
                                     @NotNull
                                     AcquisitionPolicy acquisitionPolicy)
Execute the Plan with the provided BuildDetectionAction and AcquisitionPolicy Calls to this method will acquire a lock according to the AcquisitionPolicy on a per Plan granularity

Parameters:
plan -
buildDetectionAction -
acquisitionPolicy -
Returns:
planExecutionResult
Throws:
IncorrectPlanTypeException - if the Plan could not be processed

startManualExecution

@NotNull
ExecutionRequestResult startManualExecution(@NotNull
                                                    Plan plan,
                                                    @NotNull
                                                    com.atlassian.user.User user)
Attempts to start a manual execution of the given Plan

Parameters:
plan -
user -
Returns:
executionRequestResult

startManualExecution

@NotNull
ExecutionRequestResult startManualExecution(@NotNull
                                                    Plan Plan,
                                                    @NotNull
                                                    com.atlassian.user.User user,
                                                    @NotNull
                                                    java.util.Map<java.lang.String,java.lang.String> params)
Attempts to start a manual execution of the given Plan

Parameters:
Plan -
user -
params -
Returns:
executionRequestResult

isBuildingAllowed

boolean isBuildingAllowed(@NotNull
                          Plan plan)
Checks if a particular build is allowed to be built. It checks if it exists, not suspened, and that there is no global flag that has stopped building

Parameters:
plan -
Returns:
true if plan is allowed to be built

getCurrentlyBuildingForPlan

java.util.List<CurrentlyBuilding> getCurrentlyBuildingForPlan(PlanKey planKey)
Returns all for specified PlanKey In case plan is a Chain instance, all currently running jobs will be returned

Parameters:
planKey -
Returns:

getCurrentlyBuildingForPlanResult

@NotNull
java.util.List<CurrentlyBuilding> getCurrentlyBuildingForPlanResult(PlanResultKey planKey)
Returns all CurrentlyBuilding for specified PlanResultKey In case plan is a Chain instance, all currently running jobs will be returned, however, chain itself will be not included in the list (effectively CurrentlyBuilding for all chain's children jobs will be returned)

Parameters:
planKey -
Returns:

stopPlan

void stopPlan(@NotNull
              PlanResultKey planResultKey,
              boolean abandonResult,
              java.lang.String userName)

stopPlan

void stopPlan(@NotNull
              PlanKey planKey,
              boolean abandonResult,
              java.lang.String userName)
              throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException


Copyright © 2010 Atlassian. All Rights Reserved.