org.apache.commons.pipeline.validation
Interface PipelineValidator

All Known Implementing Classes:
SimplePipelineValidator

public interface PipelineValidator

This interface is used as the basis for validation strategies that may be used to check the validity of a pipeline under construction.


Method Summary
 List<ValidationFailure> validate(Pipeline pipeline)
          Implementations of this method should validate the overall structure of the pipeline.
 List<ValidationFailure> validateAddBranch(Pipeline pipeline, String branchKey, Pipeline branch)
          Implementations of this method should validate whether or not the specified branch can be added to the specified pipeline with the given key.
 List<ValidationFailure> validateAddStage(Pipeline pipeline, Stage stage, StageDriverFactory driverFactory)
          Implementations of this method should validate whether or not the specified stage can be added to the pipeline in its current state.
 

Method Detail

validate

List<ValidationFailure> validate(Pipeline pipeline)
Implementations of this method should validate the overall structure of the pipeline.

Parameters:
pipeline - The pipeline to be validated
Returns:
The list of validation errors encountered. An empty list is returned if no errors are found.

validateAddStage

List<ValidationFailure> validateAddStage(Pipeline pipeline,
                                         Stage stage,
                                         StageDriverFactory driverFactory)
Implementations of this method should validate whether or not the specified stage can be added to the pipeline in its current state.

Parameters:
pipeline - The pipeline to which the stage is being added
stage - The added stage
driverFactory - The StageDriverFactory used to create a StageDriver for the stage
Returns:
The list of validation errors encountered, or an empty list if none were encountered

validateAddBranch

List<ValidationFailure> validateAddBranch(Pipeline pipeline,
                                          String branchKey,
                                          Pipeline branch)
Implementations of this method should validate whether or not the specified branch can be added to the specified pipeline with the given key.

Parameters:
pipeline - The pipeline to which the branch is being added
branchKey - The key used to identify the new branch
branch - The new branch pipeline
Returns:
The list of validation failures, or an empty list if validation passes.


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.