Package org.guvnor.ala.services.api
Interface PipelineService
-
@Path("pipelines") public interface PipelineServicePipeline Service interface. It allows us to create and run new Pipelines URL: {app-context}/pipelines/
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeletePipelineExecution(String executionId)Deletes a pipeline executionPipelineConfigsListgetPipelineConfigs(Integer page, Integer pageSize, String sort, boolean sortOrder)Gets all the Pipeline Configurations registered in the service.PipelineConfigsListgetPipelineConfigs(String providerTypeName, String providerTypeVersion, Integer page, Integer pageSize, String sort, boolean sortOrder)Gets the Pipeline Configurations registered in the service and associated to the given provider type.List<String>getPipelineNames(String providerTypeName, String providerTypeVersion, Integer page, Integer pageSize, String sort, boolean sortOrder)Gets the names of the Pipelines associated to the given provider type.StringnewPipeline(org.guvnor.ala.pipeline.PipelineConfig config)Registers a new Pipeline with the provided configuration.StringnewPipeline(org.guvnor.ala.pipeline.PipelineConfig config, org.guvnor.ala.runtime.providers.ProviderType providerType)Registers a new Pipeline with the provided configuration and associates it with the given provider type.StringrunPipeline(String pipelineId, org.guvnor.ala.pipeline.Input input, boolean async)Run/Execute a registered Pipeline.voidstopPipelineExecution(String executionId)Stops a running pipeline execution.
-
-
-
Method Detail
-
getPipelineConfigs
@GET @Produces("application/json") @Consumes("application/json") PipelineConfigsList getPipelineConfigs(@QueryParam("page") @DefaultValue("0") Integer page, @QueryParam("pageSize") @DefaultValue("10") Integer pageSize, @QueryParam("sort") String sort, @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder) throws BusinessExceptionGets all the Pipeline Configurations registered in the service.- Returns:
- a PipelineConfigsList with the list of pipeline configurations.
- Throws:
BusinessException- See Also:
PipelineConfigsList
-
getPipelineConfigs
@GET @Path("providertype") @Produces("application/json") @Consumes("application/json") PipelineConfigsList getPipelineConfigs(@QueryParam("providerTypeName") String providerTypeName, @QueryParam("providerTypeVersion") String providerTypeVersion, @QueryParam("page") @DefaultValue("0") Integer page, @QueryParam("pageSize") @DefaultValue("10") Integer pageSize, @QueryParam("sort") String sort, @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder) throws BusinessExceptionGets the Pipeline Configurations registered in the service and associated to the given provider type.- Parameters:
providerTypeName- a provider type name registered in the system.providerTypeVersion- the provider type version corresponding to the provider type.- Returns:
- a PipelineConfigsList with the pipeline configurations associated with the provider type.
- Throws:
BusinessException- See Also:
PipelineConfigsList
-
getPipelineNames
@GET @Path("providertype/names") @Produces("application/json") @Consumes("application/json") List<String> getPipelineNames(@QueryParam("providerTypeName") String providerTypeName, @QueryParam("providerTypeVersion") String providerTypeVersion, @QueryParam("page") @DefaultValue("0") Integer page, @QueryParam("pageSize") @DefaultValue("10") Integer pageSize, @QueryParam("sort") String sort, @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder) throws BusinessExceptionGets the names of the Pipelines associated to the given provider type.- Parameters:
providerTypeName- a provider type name registered in the system.providerTypeVersion- the provider type version corresponding to the provider type.- Returns:
- a list with the names of the Pipelines associated with the provider type.
- Throws:
BusinessException
-
newPipeline
@POST @Consumes("application/json") @Produces("application/json") String newPipeline(@NotNull org.guvnor.ala.pipeline.PipelineConfig config) throws BusinessExceptionRegisters a new Pipeline with the provided configuration.- Parameters:
config- the pipeline configuration.- Returns:
- the pipeline id.
- Throws:
BusinessException- See Also:
PipelineConfig
-
newPipeline
@POST @Path("providertype") @Consumes("application/json") @Produces("application/json") String newPipeline(@NotNull org.guvnor.ala.pipeline.PipelineConfig config, @NotNull org.guvnor.ala.runtime.providers.ProviderType providerType) throws BusinessExceptionRegisters a new Pipeline with the provided configuration and associates it with the given provider type.- Parameters:
config- the pipeline configuration.providerType- A provider type for associating the pipeline.- Returns:
- String with the pipeline id
- Throws:
BusinessException- See Also:
PipelineConfig
-
runPipeline
@POST @Consumes("application/json") @Produces("application/json") @Path("execution/{pipelineId}/run") String runPipeline(@PathParam("pipelineId") String pipelineId, @NotNull org.guvnor.ala.pipeline.Input input, @NotNull boolean async) throws BusinessExceptionRun/Execute a registered Pipeline.- Parameters:
pipelineId- of the pipeline to be executed.input- Input values to be used for the pipeline execution.async- establishes the execution mode. true for asynchronous execution, false for synchronous execution.- Returns:
- the pipeline execution id.
- Throws:
BusinessException
-
stopPipelineExecution
@PUT @Path("execution/{executionId}/stop") void stopPipelineExecution(@PathParam("executionId") String executionId) throws BusinessExceptionStops a running pipeline execution.- Parameters:
executionId- A pipeline execution id to stop. The pipeline execution id is typically returned by the runPipeline method.- Throws:
BusinessException
-
deletePipelineExecution
@DELETE @Path("execution/{executionId}") void deletePipelineExecution(@PathParam("executionId") String executionId) throws BusinessExceptionDeletes a pipeline execution- Parameters:
executionId- A pipeline execution id to delete. The pipeline execution id is typically returned by the runPipeline method.- Throws:
BusinessException
-
-