|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.plan.PlanExecutionManagerImpl
public class PlanExecutionManagerImpl
Constructor Summary | |
---|---|
PlanExecutionManagerImpl(BuildExecutionManager buildExecutionManager,
ChainExecutionManager chainExecutionManager,
BuildDetectionActionFactory buildDetectionActionFactory,
PlanExecutionPermitter planExecutionPermitter,
ExecutionStatusProvider executionStatusProvider,
PlanManager planManager,
StopBuildManager stopBuildManager,
TriggerManager triggerManager,
PlanExecutionLockService planExecutionLockService)
|
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 planResultKey)
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) |
java.util.Collection<? extends ExecutionStatus> |
getExecutionStatus(PlanKey planKey)
Returns a collection of current ExecutionStatus s for PlanKey |
ExecutionStatus |
getExecutionStatus(PlanResultKey planResultKey)
Returns a ExecutionStatus for the given PlanResultKey |
BuildExecution |
getJobExecution(PlanResultKey planResultKey)
Get the state of a single Job being executed |
boolean |
isBuildingAllowed(ImmutableChain chain)
Checks if a particular build is allowed to be built. |
boolean |
isBusy()
|
boolean |
isBusy(PlanKey planKey)
Tests if the Plan represented by PlanKey is busy starting |
int |
numberOfExecutions(PlanKey planKey)
Returns the number of current ExecutionStatus s available for PlanKey |
ExecutionRequestResult |
start(ImmutableChain chain,
BuildDetectionAction buildDetectionAction,
AcquisitionPolicy acquisitionPolicy)
Execute the ImmutableChain with the provided BuildDetectionAction and AcquisitionPolicy
Calls to this method will acquire a lock according to the AcquisitionPolicy on a per Plan
granularity |
ExecutionRequestResult |
start(ImmutableChain chain,
PlanExecutionConfig planExecutionConfig,
java.lang.String triggerReasonPluginKey,
java.lang.String planTriggerPluginKey,
java.util.Map<java.lang.String,java.lang.String> params,
java.util.Map<java.lang.String,java.lang.String> variables,
AcquisitionPolicy acquisitionPolicy)
Execute the provided Plan with a custom TriggerReason , PlanTrigger , parameters and
variables |
ExecutionRequestResult |
startManualExecution(ImmutableChain chain,
PlanExecutionConfig planExecutionConfig,
com.atlassian.user.User user,
java.util.Map<java.lang.String,java.lang.String> params,
java.util.Map<java.lang.String,java.lang.String> variables)
Attempts to start a manual execution of a given Plan controlled by PlanExecutionConfig
PlanExecutionConfig allows to control manual stages execution as well as enforcing execution of manual stages |
ExecutionRequestResult |
startManualExecution(ImmutableChain chain,
PlanExecutionConfig planExecutionConfig,
com.atlassian.user.User user,
java.lang.String triggerReasonPluginKey,
java.lang.String planTriggerPluginKey,
java.util.Map<java.lang.String,java.lang.String> params,
java.util.Map<java.lang.String,java.lang.String> variables)
Attempts to start a manual execution of a given Plan controlled by PlanExecutionConfig
PlanExecutionConfig allows to control manual stages execution as well as enforcing execution of manual stages |
ExecutionRequestResult |
startManualExecution(ImmutableChain chain,
com.atlassian.user.User user)
Attempts to start a manual execution of the given Plan |
ExecutionRequestResult |
startManualExecution(ImmutableChain chain,
com.atlassian.user.User user,
java.util.Map<java.lang.String,java.lang.String> params,
java.util.Map<java.lang.String,java.lang.String> variables)
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)
|
void |
stopRequest(PlanKey planKey)
Stops a build requests for the given PlanKey |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlanExecutionManagerImpl(BuildExecutionManager buildExecutionManager, ChainExecutionManager chainExecutionManager, BuildDetectionActionFactory buildDetectionActionFactory, PlanExecutionPermitter planExecutionPermitter, ExecutionStatusProvider executionStatusProvider, PlanManager planManager, StopBuildManager stopBuildManager, TriggerManager triggerManager, PlanExecutionLockService planExecutionLockService)
Method Detail |
---|
public int numberOfExecutions(@NotNull PlanKey planKey)
ExecutionStatusProvider
ExecutionStatus
s available for PlanKey
numberOfExecutions
in interface ExecutionStatusProvider
@NotNull public java.util.Collection<? extends ExecutionStatus> getExecutionStatus(@NotNull PlanKey planKey)
ExecutionStatusProvider
ExecutionStatus
s for PlanKey
getExecutionStatus
in interface ExecutionStatusProvider
@Nullable public ExecutionStatus getExecutionStatus(@NotNull PlanResultKey planResultKey)
ExecutionStatusProvider
ExecutionStatus
for the given PlanResultKey
getExecutionStatus
in interface ExecutionStatusProvider
public BuildExecution getJobExecution(@NotNull PlanResultKey planResultKey)
ExecutionStatusProvider
getJobExecution
in interface ExecutionStatusProvider
@NotNull public ExecutionRequestResult startManualExecution(@NotNull ImmutableChain chain, @NotNull com.atlassian.user.User user)
PlanExecutionManager
Plan
startManualExecution
in interface PlanExecutionManager
public ExecutionRequestResult startManualExecution(@NotNull ImmutableChain chain, @NotNull com.atlassian.user.User user, @NotNull java.util.Map<java.lang.String,java.lang.String> params, @NotNull java.util.Map<java.lang.String,java.lang.String> variables)
PlanExecutionManager
Plan
startManualExecution
in interface PlanExecutionManager
params
- - additional execution parameters set in code to parametrized build - not exposed to uservariables
- - user defined variables that could be parametrized in manual execution - contain only values
changed by user in UI
@NotNull public ExecutionRequestResult startManualExecution(@NotNull ImmutableChain chain, @Nullable PlanExecutionConfig planExecutionConfig, @NotNull com.atlassian.user.User user, @NotNull java.util.Map<java.lang.String,java.lang.String> params, @NotNull java.util.Map<java.lang.String,java.lang.String> variables)
PlanExecutionManager
Plan
controlled by PlanExecutionConfig
PlanExecutionConfig
allows to control manual stages execution as well as enforcing execution of manual stages
startManualExecution
in interface PlanExecutionManager
@NotNull public ExecutionRequestResult startManualExecution(@NotNull ImmutableChain chain, @Nullable PlanExecutionConfig planExecutionConfig, @NotNull com.atlassian.user.User user, @Nullable java.lang.String triggerReasonPluginKey, @Nullable java.lang.String planTriggerPluginKey, @NotNull java.util.Map<java.lang.String,java.lang.String> params, @NotNull java.util.Map<java.lang.String,java.lang.String> variables)
PlanExecutionManager
Plan
controlled by PlanExecutionConfig
PlanExecutionConfig
allows to control manual stages execution as well as enforcing execution of manual stages
startManualExecution
in interface PlanExecutionManager
public boolean isBusy(@NotNull PlanKey planKey)
PlanExecutionManager
Plan
represented by PlanKey
is busy starting
isBusy
in interface PlanExecutionManager
public boolean isBusy()
isBusy
in interface PlanExecutionManager
@NotNull public ExecutionRequestResult start(@NotNull ImmutableChain chain, @Nullable PlanExecutionConfig planExecutionConfig, @NotNull java.lang.String triggerReasonPluginKey, @NotNull java.lang.String planTriggerPluginKey, @NotNull java.util.Map<java.lang.String,java.lang.String> params, @NotNull java.util.Map<java.lang.String,java.lang.String> variables, @NotNull AcquisitionPolicy acquisitionPolicy)
PlanExecutionManager
Plan
with a custom TriggerReason
, PlanTrigger
, parameters and
variables
start
in interface PlanExecutionManager
planExecutionConfig
- extended configuration for executiontriggerReasonPluginKey
- full plugin key for a TriggerReason
planTriggerPluginKey
- full plugin key for a PlanTrigger
params
- custom paramsvariables
- overriden variablesacquisitionPolicy
- to aquire the lock
@NotNull public ExecutionRequestResult start(@NotNull ImmutableChain chain, @NotNull BuildDetectionAction buildDetectionAction, @NotNull AcquisitionPolicy acquisitionPolicy)
PlanExecutionManager
ImmutableChain
with the provided BuildDetectionAction
and AcquisitionPolicy
Calls to this method will acquire a lock according to the AcquisitionPolicy
on a per Plan
granularity
start
in interface PlanExecutionManager
public boolean isBuildingAllowed(@NotNull ImmutableChain chain)
PlanExecutionManager
isBuildingAllowed
in interface PlanExecutionManager
@NotNull public java.util.List<CurrentlyBuilding> getCurrentlyBuildingForPlan(PlanKey planKey)
PlanExecutionManager
PlanKey
In case plan is a Chain
instance, all
currently running jobs will be returned
getCurrentlyBuildingForPlan
in interface PlanExecutionManager
@NotNull public java.util.List<CurrentlyBuilding> getCurrentlyBuildingForPlanResult(PlanResultKey planResultKey)
PlanExecutionManager
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)
getCurrentlyBuildingForPlanResult
in interface PlanExecutionManager
public void stopPlan(@NotNull PlanResultKey planResultKey, boolean abandonResult, java.lang.String userName)
stopPlan
in interface PlanExecutionManager
public void stopPlan(@NotNull PlanKey planKey, boolean abandonResult, java.lang.String userName) throws java.lang.InterruptedException
stopPlan
in interface PlanExecutionManager
java.lang.InterruptedException
public void stopRequest(@NotNull PlanKey planKey)
PlanExecutionManager
PlanKey
stopRequest
in interface PlanExecutionManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |