Package org.guvnor.ala.services.api
Interface RuntimeProvisioningService
-
@Path("runtime") public interface RuntimeProvisioningServiceRuntime 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidderegisterProvider(String name)Unregister an existing ProvidervoiddestroyRuntime(String runtimeId, boolean forced)Destroy an existing Runtime.RuntimeQueryResultItemListexecuteQuery(RuntimeQuery query)Executes a query against the runtime system.ProviderListgetProviders(Integer page, Integer pageSize, String sort, boolean sortOrder)Get all the registered ProvidersProviderTypeListgetProviderTypes(Integer page, Integer pageSize, String sort, boolean sortOrder)Get all the registered ProviderTypesRuntimeListgetRuntimes(Integer page, Integer pageSize, String sort, boolean sortOrder)Get All RuntimesStringnewRuntime(org.guvnor.ala.config.RuntimeConfig conf)Create a new RuntimevoidregisterProvider(org.guvnor.ala.config.ProviderConfig conf)Register a new ProvidervoidrestartRuntime(String runtimeId)Restart a given RuntimevoidstartRuntime(String runtimeId)Start a given RuntimevoidstopRuntime(String runtimeId)Stop a given 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 BusinessExceptionGet 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 BusinessExceptionGet 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 BusinessExceptionRegister 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 BusinessExceptionUnregister 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 BusinessExceptionCreate 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 BusinessExceptionDestroy an existing Runtime.- Parameters:
runtimeId- the identifier of the runtime to destroyforced- 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 BusinessExceptionGet All Runtimes- Returns:
- RuntimeList containing all the registered Runtimes
- Throws:
BusinessException
-
startRuntime
@PUT @Path("runtimes/{id}/start") void startRuntime(@PathParam("id") String runtimeId) throws BusinessExceptionStart 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 BusinessExceptionStop 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 BusinessExceptionRestart 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 BusinessExceptionExecutes 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
-
-