Interface DeploymentPlanningContext
-
public interface DeploymentPlanningContextContext that is passed along during the Planning stage of a Deployment. This can be used to addDeploymentStepto the current plan, or store and retrieve attributes to transfer knowledge between multiple Contributors/Processors.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddCheckpoint(Step step, Checkpoint checkpoint)Add a checkpoint so that the state after this step has been executed can be committed.voidaddCheckpoint(Step step, Delta delta)Add a checkpoint so that the state after this step has been executed can be committed.voidaddCheckpoint(Step step, Delta delta, Operation overrideOperation)Add a checkpoint so that the state after this step has been executed can be committed.voidaddCheckpoint(Step step, java.lang.Iterable<Delta> deltas)Add a checkpoint so that the state after this step has been executed can be committed.voidaddStep(DeploymentStep step)Deprecated.Use Step instead of DeploymentStepvoidaddStep(Step step)Add a step to the current plan.voidaddSteps(DeploymentStep... steps)Deprecated.Use Step instead of DeploymentStepvoidaddSteps(Step... steps)Add multiple steps to the current plan.voidaddSteps(java.lang.Iterable<Step> steps)Add multiple steps to the current plan.voidaddSteps(java.util.Collection<DeploymentStep> steps)Deprecated.Use Step instead of DeploymentStepvoidaddStepWithCheckpoint(Step step, Checkpoint checkpoint)Add a step and register a checkpoint so that the state after this step has been executed can be committed.voidaddStepWithCheckpoint(Step step, Delta delta)Add a step and register a checkpoint so that the state after this step has been executed can be committed.voidaddStepWithCheckpoint(Step step, Delta delta, Operation overrideOperation)Add a step and register a checkpoint so that the state after this step has been executed can be committed.voidaddStepWithCheckpoint(Step step, java.lang.Iterable<Delta> deltas)Add a step and register a checkpoint so that the state after this step has been executed can be committed.com.xebialabs.deployit.plugin.api.services.ArtifactTransformergetArtifactTransformer(java.lang.String transformerName)Returns the artifact transformer for given name.java.lang.ObjectgetAttribute(java.lang.String name)Returns the planning context attribute with the given name, or null if there is no attribute by that name.DeployedApplicationgetDeployedApplication()Returns the DeployedApplication for which the plan is being created.DeployedApplicationgetPreviousDeployedApplication()Returns the DeploymentApplication of the previous deployment.RepositorygetRepository()Returns the repository where all the ConfigurationItems known in XL Deploy are stored.booleanisRollback()Whether the planning occurs as the result of a rollback of a previous deployment.java.io.InputStreampatch(java.io.InputStream content, ConfigurationItem ci)Applies patches to the content provided.java.lang.Stringpatch(java.lang.String content, ConfigurationItem ci)Applies patches to the content provided.voidsetAttribute(java.lang.String name, java.lang.Object value)Stores an attribute in the planning context.
-
-
-
Method Detail
-
addStep
@Deprecated void addStep(DeploymentStep step)
Deprecated.Use Step instead of DeploymentStepAdd a step to the current plan.- Parameters:
step- the step to add.
-
addSteps
@Deprecated void addSteps(DeploymentStep... steps)
Deprecated.Use Step instead of DeploymentStepAdd multiple steps to the current plan.- Parameters:
steps- the steps to add.
-
addSteps
@Deprecated void addSteps(java.util.Collection<DeploymentStep> steps)
Deprecated.Use Step instead of DeploymentStepAdd multiple steps to the current plan.- Parameters:
steps- the steps to add.
-
addStep
void addStep(Step step)
Add a step to the current plan.- Parameters:
step- the step to add.
-
addSteps
void addSteps(Step... steps)
Add multiple steps to the current plan.- Parameters:
steps- the steps to add.
-
addSteps
void addSteps(java.lang.Iterable<Step> steps)
Add multiple steps to the current plan.- Parameters:
steps- the steps to add.
-
addCheckpoint
void addCheckpoint(Step step, Checkpoint checkpoint)
Add a checkpoint so that the state after this step has been executed can be committed. N.B. This does not add the step to the planning context, useaddStep(com.xebialabs.deployit.plugin.api.flow.Step).- Parameters:
step- The Step that needs to complete before we checkpointcheckpoint- The checkpoint to add.
-
addCheckpoint
void addCheckpoint(Step step, Delta delta)
Add a checkpoint so that the state after this step has been executed can be committed. N.B. This does not add the step to the planning context, useaddStep(com.xebialabs.deployit.plugin.api.flow.Step).- Parameters:
step- The Step that needs to complete before we checkpointdelta- The Delta that needs to be checkpointed.
-
addCheckpoint
void addCheckpoint(Step step, Delta delta, Operation overrideOperation)
Add a checkpoint so that the state after this step has been executed can be committed. N.B. This does not add the step to the planning context, useaddStep(com.xebialabs.deployit.plugin.api.flow.Step).- Parameters:
step- The Step that needs to complete before we checkpointdelta- The Delta that needs to be checkpointed.overrideOperation- The operation that is actually performed on the Delta, useful in case of split implementations of Update Delta's (ie. DESTROY -> CREATE).
-
addCheckpoint
void addCheckpoint(Step step, java.lang.Iterable<Delta> deltas)
Add a checkpoint so that the state after this step has been executed can be committed. N.B. This does not add the step to the planning context, useaddStep(com.xebialabs.deployit.plugin.api.flow.Step).- Parameters:
step- The Step that needs to complete before we checkpointdeltas- The Deltas that need to be checkpointed.
-
addStepWithCheckpoint
void addStepWithCheckpoint(Step step, Checkpoint checkpoint)
Add a step and register a checkpoint so that the state after this step has been executed can be committed.- Parameters:
step- The Step that needs to complete before we checkpointcheckpoint- The checkpoint that needs to be committed
-
addStepWithCheckpoint
void addStepWithCheckpoint(Step step, Delta delta)
Add a step and register a checkpoint so that the state after this step has been executed can be committed.- Parameters:
step- The Step that needs to complete before we checkpointdelta- The Delta that needs to be checkpointed.
-
addStepWithCheckpoint
void addStepWithCheckpoint(Step step, Delta delta, Operation overrideOperation)
Add a step and register a checkpoint so that the state after this step has been executed can be committed.- Parameters:
step- The Step that needs to complete before we checkpointdelta- The Delta that needs to be checkpointed.overrideOperation- The operation that is actually performed on the Delta, useful in case of split implementations of Update Delta's (ie. DESTROY -> CREATE).
-
addStepWithCheckpoint
void addStepWithCheckpoint(Step step, java.lang.Iterable<Delta> deltas)
Add a step and register a checkpoint so that the state after this step has been executed can be committed.- Parameters:
step- The Step that needs to complete before we checkpointdeltas- The Deltas that need to be checkpointed.
-
getAttribute
java.lang.Object getAttribute(java.lang.String name)
Returns the planning context attribute with the given name, or null if there is no attribute by that name.- Parameters:
name- the name of the attribute- Returns:
- the value of the attribute, or null if there is no attribute by that name.
-
setAttribute
void setAttribute(java.lang.String name, java.lang.Object value)Stores an attribute in the planning context. This attribute will be available while the deployment plan is being created.- Parameters:
name- the name of the attributevalue- the value of the attribute
-
getDeployedApplication
DeployedApplication getDeployedApplication()
Returns the DeployedApplication for which the plan is being created.- Returns:
- the DeployedApplication for which the plan is being created.
-
getPreviousDeployedApplication
DeployedApplication getPreviousDeployedApplication()
Returns the DeploymentApplication of the previous deployment.- Returns:
- Previous DeployedApplication. In case of new deployments returns null
-
getRepository
Repository getRepository()
Returns the repository where all the ConfigurationItems known in XL Deploy are stored. Note: This repository cannot be stored in a step and should only be used during planning. During execution you have access to the repository through the ExecutionContext.- Returns:
- the repository
-
patch
java.io.InputStream patch(java.io.InputStream content, ConfigurationItem ci)Applies patches to the content provided.- Parameters:
content- the content that needs to be patchedci- the ci related to the content- Returns:
- the patched string
-
patch
java.lang.String patch(java.lang.String content, ConfigurationItem ci)Applies patches to the content provided.- Parameters:
content- the content that needs to be patchedci- the ci related to the content- Returns:
- the patched string
-
getArtifactTransformer
com.xebialabs.deployit.plugin.api.services.ArtifactTransformer getArtifactTransformer(java.lang.String transformerName)
Returns the artifact transformer for given name. If the transformer with given name is not registered an runtime exception will be thrown.- Parameters:
transformerName- the transformer name registered in system- Returns:
- the corresponding artifact transformer
-
isRollback
boolean isRollback()
Whether the planning occurs as the result of a rollback of a previous deployment.- Returns:
- true if this is a planning operation for a rollback deployment
-
-