Interface RuntimeProvisioningService


  • @Path("runtime")
    public interface RuntimeProvisioningService
    Runtime Provisioning Service interface. It allows us to register and interact with different Provisioning Providers and to create new Runtimes on these providers. URL: {app-context}/runtime/
    • Method Detail

      • getProviderTypes

        @GET
        @Consumes("application/json")
        @Produces("application/json")
        @Path("providertypes")
        ProviderTypeList getProviderTypes​(@QueryParam("page") @DefaultValue("0")
                                          Integer page,
                                          @QueryParam("pageSize") @DefaultValue("10")
                                          Integer pageSize,
                                          @QueryParam("sort")
                                          String sort,
                                          @QueryParam("sortOrder") @DefaultValue("true")
                                          boolean sortOrder)
                                   throws BusinessException
        Get all the registered ProviderTypes
        Returns:
        ProviderTypeList containing all the registered provider types
        Throws:
        BusinessException
        See Also:
        ProviderTypeList
      • getProviders

        @GET
        @Produces("application/json")
        @Path("providers")
        ProviderList getProviders​(@QueryParam("page") @DefaultValue("0")
                                  Integer page,
                                  @QueryParam("pageSize") @DefaultValue("10")
                                  Integer pageSize,
                                  @QueryParam("sort")
                                  String sort,
                                  @QueryParam("sortOrder") @DefaultValue("true")
                                  boolean sortOrder)
                           throws BusinessException
        Get all the registered Providers
        Returns:
        ProviderList containing all the registered providers
        Throws:
        BusinessException
        See Also:
        ProviderList
      • registerProvider

        @POST
        @Consumes("application/json")
        @Path("providers")
        void registerProvider​(@NotNull
                              org.guvnor.ala.config.ProviderConfig conf)
                       throws BusinessException
        Register a new Provider
        Parameters:
        conf - the ProviderConfig used to create the new Provider
        Throws:
        BusinessException
      • deregisterProvider

        @DELETE
        @Path("providers")
        void deregisterProvider​(@FormParam("name")
                                String name)
                         throws BusinessException
        Unregister an existing Provider
        Parameters:
        name - a provider name
        Throws:
        BusinessException
      • newRuntime

        @POST
        @Path("runtimes")
        @Consumes("application/json")
        @Produces("application/json")
        String newRuntime​(@NotNull
                          org.guvnor.ala.config.RuntimeConfig conf)
                   throws BusinessException
        Create a new Runtime
        Parameters:
        conf - a RuntimeConfig containing the configuration used to create the new Runtime
        Throws:
        BusinessException
      • destroyRuntime

        @DELETE
        @Consumes("application/json")
        @Path("runtimes/{id}/destroy")
        void destroyRuntime​(@PathParam("id")
                            String runtimeId,
                            @QueryParam("forced") @DefaultValue("false")
                            boolean forced)
                     throws BusinessException
        Destroy an existing Runtime.
        Parameters:
        runtimeId - the identifier of the runtime to destroy
        forced - indicates if the runtime must be deleted from the guvnor-ala registries independently of the connectivity with the external provider. e.g. if it was not possible to connect an external WF where the runtime is running.
        Throws:
        BusinessException
      • getRuntimes

        @GET
        @Produces("application/json")
        @Path("runtimes")
        RuntimeList getRuntimes​(@QueryParam("page") @DefaultValue("0")
                                Integer page,
                                @QueryParam("pageSize") @DefaultValue("10")
                                Integer pageSize,
                                @QueryParam("sort")
                                String sort,
                                @QueryParam("sortOrder") @DefaultValue("true")
                                boolean sortOrder)
                         throws BusinessException
        Get All Runtimes
        Returns:
        RuntimeList containing all the registered Runtimes
        Throws:
        BusinessException
      • startRuntime

        @PUT
        @Path("runtimes/{id}/start")
        void startRuntime​(@PathParam("id")
                          String runtimeId)
                   throws BusinessException
        Start a given Runtime
        Parameters:
        runtimeId - the identifier of the runtime to be started
        Throws:
        BusinessException
      • stopRuntime

        @PUT
        @Path("runtimes/{id}/stop")
        void stopRuntime​(@PathParam("id")
                         String runtimeId)
                  throws BusinessException
        Stop a given Runtime
        Parameters:
        runtimeId - the identifier of the runtime to be stopped
        Throws:
        BusinessException
      • restartRuntime

        @PUT
        @Path("runtimes/{id}/restart")
        void restartRuntime​(@PathParam("id")
                            String runtimeId)
                     throws BusinessException
        Restart a given Runtime
        Parameters:
        runtimeId - the identifier of the runtime to be restarted
        Throws:
        BusinessException
      • executeQuery

        @GET
        @Path("runtimes/query")
        @Produces("application/json")
        @Consumes("application/json")
        RuntimeQueryResultItemList executeQuery​(@NotNull
                                                RuntimeQuery query)
                                         throws BusinessException
        Executes a query against the runtime system.
        Parameters:
        query - a runtime query to execute.
        Returns:
        a RuntimeQueryResultItemList with the items that fulfils the query parameters.
        Throws:
        BusinessException - in case of an internal exception