com.xebialabs.deployit.plugin.api.deployment.planning
Interface DeploymentPlanningContext


public interface DeploymentPlanningContext

Context that is passed along during the Planning stage of a Deployment. This can be used to add DeploymentStep to the current plan, or store and retrieve attributes to transfer knowledge between multiple Contributors/Processors.


Method Summary
 void addCheckpoint(Step step, Delta delta)
          Add a checkpoint so that the state after this step has been executed can be committed.
 void addCheckpoint(Step step, Delta delta, Operation overrideOperation)
          Add a checkpoint so that the state after this step has been executed can be committed.
 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.
 void addStep(DeploymentStep step)
          Deprecated. Use Step instead of DeploymentStep
 void addStep(Step step)
          Add a step to the current plan.
 void addSteps(java.util.Collection<DeploymentStep> steps)
          Deprecated. Use Step instead of DeploymentStep
 void addSteps(DeploymentStep... steps)
          Deprecated. Use Step instead of DeploymentStep
 void addSteps(java.lang.Iterable<Step> steps)
          Add multiple steps to the current plan.
 void addSteps(Step... steps)
          Add multiple steps to the current plan.
 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.
 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.
 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.
 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.
 DeployedApplication getDeployedApplication()
          Returns the DeployedApplication for which the plan is being created.
 ReadOnlyRepository getRepository()
          Returns a read-only view of the repository of Deployit.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Stores an attribute in the planning context.
 

Method Detail

addStep

void addStep(DeploymentStep step)
Deprecated. Use Step instead of DeploymentStep

Add a step to the current plan.

Parameters:
step - the step to add.

addSteps

void addSteps(DeploymentStep... steps)
Deprecated. Use Step instead of DeploymentStep

Add multiple steps to the current plan.

Parameters:
steps - the steps to add.

addSteps

void addSteps(java.util.Collection<DeploymentStep> steps)
Deprecated. Use Step instead of DeploymentStep

Add 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,
                   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, use addStep(com.xebialabs.deployit.plugin.api.flow.Step).

Parameters:
step - The Step that needs to complete before we checkpoint
delta - 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, use addStep(com.xebialabs.deployit.plugin.api.flow.Step).

Parameters:
step - The Step that needs to complete before we checkpoint
delta - 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, use addStep(com.xebialabs.deployit.plugin.api.flow.Step).

Parameters:
step - The Step that needs to complete before we checkpoint
deltas - The Deltas that need to be checkpointed.

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 checkpoint
delta - 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 checkpoint
delta - 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 checkpoint
deltas - 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 attribute
value - 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.

getRepository

ReadOnlyRepository getRepository()
Returns a read-only view of the repository of Deployit. Note: This repository cannot be stored in a step and should only be used during planning.

Returns:
a read-only view of the repository