Package jetbrains.buildServer.pipeline
Interface PipelineManager
-
- All Known Implementing Classes:
PipelineManagerImpl
public interface PipelineManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PipelinefindById(String id)PipelinefindByProject(SProject project)List<Pipeline>getAll(String parentProjectExtId)Returns all the pipelines stored under the given projectbooleanisPipeline(SProject project)voidremove(Pipeline pipeline)Pipelinesave(Pipeline pipeline, String parentProjectExtId)Save a new pipeline, or force the pipeline update without checking if its version is outdatedPipelinesave(Pipeline pipeline, String previousVersion, String parentProjectExtId)This method acts as an optimistic lock When fetching pipeline usingfindById(String)or#getAll(), a current pipeline version is provided byPipeline.getPipelineVersion()When the same pipeline is saved, this version should be provided as [previousVersion] parameter Provided version will be compared to the current version of the pipeline - If the versions match, save will be successful - If the versions don't match,OutdatedPipelineVersionExceptionwill be thrown and the pipeline will not be updated This might happen if pipeline was already updated by other thread\request
-
-
-
Method Detail
-
getAll
@NotNull List<Pipeline> getAll(@Nullable String parentProjectExtId)
Returns all the pipelines stored under the given project- Parameters:
parentProjectExtId- project to find pipelines in, or in Root porject if null- Returns:
- see above
-
isPipeline
boolean isPipeline(@NotNull SProject project)
-
save
Pipeline save(@NotNull Pipeline pipeline, @NotNull String previousVersion, @Nullable String parentProjectExtId) throws OutdatedPipelineVersionException
This method acts as an optimistic lock When fetching pipeline usingfindById(String)or#getAll(), a current pipeline version is provided byPipeline.getPipelineVersion()When the same pipeline is saved, this version should be provided as [previousVersion] parameter Provided version will be compared to the current version of the pipeline - If the versions match, save will be successful - If the versions don't match,OutdatedPipelineVersionExceptionwill be thrown and the pipeline will not be updated This might happen if pipeline was already updated by other thread\request- Throws:
OutdatedPipelineVersionException
-
save
Pipeline save(@NotNull Pipeline pipeline, @Nullable String parentProjectExtId)
Save a new pipeline, or force the pipeline update without checking if its version is outdated
-
remove
void remove(@NotNull Pipeline pipeline)
-
-