com.atlassian.bamboo.deployments.execution.service
Class DeploymentExecutionServiceImpl

java.lang.Object
  extended by com.atlassian.bamboo.deployments.execution.service.DeploymentExecutionServiceImpl
All Implemented Interfaces:
DeploymentExecutionService, org.springframework.beans.factory.InitializingBean

public class DeploymentExecutionServiceImpl
extends java.lang.Object
implements DeploymentExecutionService, org.springframework.beans.factory.InitializingBean


Constructor Summary
DeploymentExecutionServiceImpl(AdministrationConfigurationAccessor administrationConfigurationAccessor, BuildLoggerManager buildLoggerManager, DeploymentResultService deploymentResultService, EnvironmentService environmentService, ErrorUpdateHandler errorUpdateHandler, com.atlassian.event.api.EventPublisher eventPublisher, FeatureManager featureManager, PlanExecutionLockService planExecutionLockService, TaskManager taskManager, VariableDefinitionManager variableDefinitionManager, DeploymentVersionService deploymentVersionService, ExecutionPhaseService executionPhaseService, DeploymentProjectService deploymentProjectService)
           
 
Method Summary
 void afterPropertiesSet()
           
 void execute(DeploymentContext deploymentContext)
          Start DeploymentContext execution.
 boolean isEnvironmentBeingDeployedTo(long environmentId)
          Check if Environment is currently being deployed to
 void onDeploymentFinished(DeploymentTimingPoints.ExecutionFinished timingPoint)
           
 DeploymentContext prepareDeploymentContext(Environment environment, DeploymentVersion deploymentVersion, TriggerReason triggerReason)
          Prepare DeploymentContext out of Environment and DeploymentVersion
 void processDeploymentResult(DeploymentContext deploymentContext)
          Process result that has come back from the agent.
 void stop(DeploymentResult deploymentResult, java.lang.Long agentId)
          Stops the execution of a running deployment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentExecutionServiceImpl

public DeploymentExecutionServiceImpl(AdministrationConfigurationAccessor administrationConfigurationAccessor,
                                      BuildLoggerManager buildLoggerManager,
                                      DeploymentResultService deploymentResultService,
                                      EnvironmentService environmentService,
                                      ErrorUpdateHandler errorUpdateHandler,
                                      com.atlassian.event.api.EventPublisher eventPublisher,
                                      FeatureManager featureManager,
                                      PlanExecutionLockService planExecutionLockService,
                                      TaskManager taskManager,
                                      VariableDefinitionManager variableDefinitionManager,
                                      DeploymentVersionService deploymentVersionService,
                                      ExecutionPhaseService executionPhaseService,
                                      DeploymentProjectService deploymentProjectService)
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

prepareDeploymentContext

public DeploymentContext prepareDeploymentContext(@NotNull
                                                  Environment environment,
                                                  @NotNull
                                                  DeploymentVersion deploymentVersion,
                                                  @NotNull
                                                  TriggerReason triggerReason)
Description copied from interface: DeploymentExecutionService
Prepare DeploymentContext out of Environment and DeploymentVersion

Specified by:
prepareDeploymentContext in interface DeploymentExecutionService

execute

public void execute(@NotNull
                    DeploymentContext deploymentContext)
Description copied from interface: DeploymentExecutionService
Start DeploymentContext execution. Before putting DeploymentContext into execution pipeline this method checks if Environment is not running any other deployment.

Specified by:
execute in interface DeploymentExecutionService

stop

public void stop(@NotNull
                 DeploymentResult deploymentResult,
                 java.lang.Long agentId)
Description copied from interface: DeploymentExecutionService
Stops the execution of a running deployment

Specified by:
stop in interface DeploymentExecutionService
Parameters:
deploymentResult - of the deployment we want to stop
agentId - agent on which the deployment is running

processDeploymentResult

public void processDeploymentResult(@NotNull
                                    DeploymentContext deploymentContext)
Description copied from interface: DeploymentExecutionService
Process result that has come back from the agent.

Specified by:
processDeploymentResult in interface DeploymentExecutionService
Parameters:
deploymentContext - from the agent.

isEnvironmentBeingDeployedTo

public boolean isEnvironmentBeingDeployedTo(long environmentId)
Description copied from interface: DeploymentExecutionService
Check if Environment is currently being deployed to

Specified by:
isEnvironmentBeingDeployedTo in interface DeploymentExecutionService
Parameters:
environmentId - id of the Environment
Returns:
true if

onDeploymentFinished

@EventListener
public void onDeploymentFinished(@NotNull
                                               DeploymentTimingPoints.ExecutionFinished timingPoint)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.