com.xebialabs.deployit.maven.helper
Class DeploymentHelper

java.lang.Object
  extended by com.xebialabs.deployit.maven.helper.DeploymentHelper

public class DeploymentHelper
extends Object


Nested Class Summary
static class DeploymentHelper.DeploymentValidationError
           
static class DeploymentHelper.EnvironmentAlreadyExistsError
           
 
Field Summary
static int TASK_WAIT_TIMEOUT_MS
           
static HashSet<com.xebialabs.deployit.engine.api.execution.TaskExecutionState> TERMINAL_STATES
           
 
Constructor Summary
DeploymentHelper(DeploymentLogger log, com.xebialabs.deployit.booter.remote.DeployitCommunicator communicator)
           
 
Method Summary
 com.xebialabs.deployit.engine.api.dto.Deployment attachExplicitDeployeds(com.xebialabs.deployit.engine.api.dto.Deployment deployment, List<MavenDeployed> explicits)
          Attaches explicitly specified deployeds to the deployment
 com.xebialabs.deployit.plugin.api.udm.ConfigurationItem createEnvironment(String id, List<? extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> members)
          Creates an environment with members
 com.xebialabs.deployit.engine.api.execution.TaskExecutionState executeAndArchiveTask(String taskId)
          Starts task, waits until it's done.
 boolean isApplicationDeployed(String source, String target)
          Checks whether application from given source is deployed to given target
 void logEnvironment(com.xebialabs.deployit.plugin.api.udm.ConfigurationItem envCi)
          logs environment and it's members
 void logStepState(String taskId, int stepNumber)
          Logs information about single step
 void logTaskState(String taskId)
          Logs information about task and all steps
 com.xebialabs.deployit.plugin.api.udm.ConfigurationItem readCiOrNull(String environmentId)
          Returns configuration item from repository, or null if it does not exist
 void skipAllSteps(String taskId)
           
 com.xebialabs.deployit.plugin.api.udm.ConfigurationItem uploadPackage(File darFile)
          Uploads and imports a .dar package to deployit.
 com.xebialabs.deployit.engine.api.dto.Deployment validateDeployment(com.xebialabs.deployit.engine.api.dto.Deployment deployment)
          Checks if deployment valid (does not contain validation messages)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TERMINAL_STATES

public static final HashSet<com.xebialabs.deployit.engine.api.execution.TaskExecutionState> TERMINAL_STATES

TASK_WAIT_TIMEOUT_MS

public static final int TASK_WAIT_TIMEOUT_MS
See Also:
Constant Field Values
Constructor Detail

DeploymentHelper

public DeploymentHelper(DeploymentLogger log,
                        com.xebialabs.deployit.booter.remote.DeployitCommunicator communicator)
Method Detail

isApplicationDeployed

public boolean isApplicationDeployed(String source,
                                     String target)
Checks whether application from given source is deployed to given target


attachExplicitDeployeds

public com.xebialabs.deployit.engine.api.dto.Deployment attachExplicitDeployeds(com.xebialabs.deployit.engine.api.dto.Deployment deployment,
                                                                                List<MavenDeployed> explicits)
Attaches explicitly specified deployeds to the deployment


skipAllSteps

public void skipAllSteps(String taskId)

executeAndArchiveTask

public com.xebialabs.deployit.engine.api.execution.TaskExecutionState executeAndArchiveTask(String taskId)
Starts task, waits until it's done. Returns one of the states: {DONE, EXECUTED, STOPPED, CANCELLED}.


logTaskState

public void logTaskState(String taskId)
Logs information about task and all steps


logStepState

public void logStepState(String taskId,
                         int stepNumber)
Logs information about single step


validateDeployment

public com.xebialabs.deployit.engine.api.dto.Deployment validateDeployment(com.xebialabs.deployit.engine.api.dto.Deployment deployment)
                                                                    throws DeploymentHelper.DeploymentValidationError
Checks if deployment valid (does not contain validation messages)

Throws:
DeploymentHelper.DeploymentValidationError

readCiOrNull

public com.xebialabs.deployit.plugin.api.udm.ConfigurationItem readCiOrNull(String environmentId)
Returns configuration item from repository, or null if it does not exist


logEnvironment

public void logEnvironment(com.xebialabs.deployit.plugin.api.udm.ConfigurationItem envCi)
logs environment and it's members


createEnvironment

public com.xebialabs.deployit.plugin.api.udm.ConfigurationItem createEnvironment(String id,
                                                                                 List<? extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> members)
                                                                          throws DeploymentHelper.EnvironmentAlreadyExistsError
Creates an environment with members

Throws:
DeploymentHelper.EnvironmentAlreadyExistsError

uploadPackage

public com.xebialabs.deployit.plugin.api.udm.ConfigurationItem uploadPackage(File darFile)
Uploads and imports a .dar package to deployit. A replacement for PackageService.upload() Check DEPLOYITPB-3999 and DEPLOYITPB-4012 for more details.



Copyright © 2014. All rights reserved.