Interface PipelineService


  • @Path("pipelines")
    public interface PipelineService
    Pipeline Service interface. It allows us to create and run new Pipelines URL: {app-context}/pipelines/
    • 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 BusinessException
        Gets 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 BusinessException
        Gets 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 BusinessException
        Gets 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 BusinessException
        Registers 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 BusinessException
        Registers 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 BusinessException
        Run/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 BusinessException
        Stops 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 BusinessException
        Deletes a pipeline execution
        Parameters:
        executionId - A pipeline execution id to delete. The pipeline execution id is typically returned by the runPipeline method.
        Throws:
        BusinessException