Interface RdTool
-
public interface RdToolInterface to the RD tool
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> TapiCall(java.util.function.Function<org.rundeck.client.api.RundeckApi,retrofit2.Call<T>> func)Perform a downgradable API call<T> TapiCallDowngradable(java.util.function.Function<org.rundeck.client.api.RundeckApi,retrofit2.Call<T>> func)Perform a downgradable api callstatic voidapiVersionCheck(java.lang.String description, int min, int currentVersion)Require the client to have minimum API version<T> org.rundeck.client.util.ServiceClient.WithErrorResponse<T>apiWithErrorResponse(java.util.function.Function<org.rundeck.client.api.RundeckApi,retrofit2.Call<T>> func)Perform a downgradable API call without handling errors in response<T> org.rundeck.client.util.ServiceClient.WithErrorResponse<T>apiWithErrorResponseDowngradable(java.util.function.Function<org.rundeck.client.api.RundeckApi,retrofit2.Call<T>> func)Perform a downgradable api call, without handling errorsorg.rundeck.client.util.RdClientConfiggetAppConfig()org.rundeck.client.util.ServiceClient<org.rundeck.client.api.RundeckApi>getClient()RdAppgetRdApp()<T extends RdCommandExtension>
TinitExtension(T extension)java.lang.StringprojectOrEnv(ProjectInput options)voidrequireApiVersion(java.lang.String description, int min)Require the client to have minimum API version
-
-
-
Method Detail
-
initExtension
<T extends RdCommandExtension> T initExtension(T extension)
-
getClient
org.rundeck.client.util.ServiceClient<org.rundeck.client.api.RundeckApi> getClient() throws InputError- Throws:
InputError
-
getAppConfig
org.rundeck.client.util.RdClientConfig getAppConfig()
-
apiCall
<T> T apiCall(java.util.function.Function<org.rundeck.client.api.RundeckApi,retrofit2.Call<T>> func) throws InputError, java.io.IOExceptionPerform a downgradable API call- Type Parameters:
T- result type- Parameters:
func- function- Returns:
- result
- Throws:
InputError- on errorjava.io.IOException- on error
-
apiWithErrorResponse
<T> org.rundeck.client.util.ServiceClient.WithErrorResponse<T> apiWithErrorResponse(java.util.function.Function<org.rundeck.client.api.RundeckApi,retrofit2.Call<T>> func) throws InputError, java.io.IOExceptionPerform a downgradable API call without handling errors in response- Type Parameters:
T- result type- Parameters:
func- function- Returns:
- response
- Throws:
InputError- on errorjava.io.IOException- on error
-
apiCallDowngradable
<T> T apiCallDowngradable(java.util.function.Function<org.rundeck.client.api.RundeckApi,retrofit2.Call<T>> func) throws InputError, java.io.IOExceptionPerform a downgradable api call- Type Parameters:
T- result type- Parameters:
func- function- Returns:
- result
- Throws:
InputError- on errorjava.io.IOException- on error
-
apiWithErrorResponseDowngradable
<T> org.rundeck.client.util.ServiceClient.WithErrorResponse<T> apiWithErrorResponseDowngradable(java.util.function.Function<org.rundeck.client.api.RundeckApi,retrofit2.Call<T>> func) throws InputError, java.io.IOExceptionPerform a downgradable api call, without handling errors- Type Parameters:
T- result type- Parameters:
func- function- Returns:
- response
- Throws:
InputError- on errorjava.io.IOException- on error
-
projectOrEnv
java.lang.String projectOrEnv(ProjectInput options) throws InputError
- Parameters:
options- project options- Returns:
- project name from options or ENV
- Throws:
InputError- if project is not set via options or ENV
-
getRdApp
RdApp getRdApp()
-
requireApiVersion
void requireApiVersion(java.lang.String description, int min) throws InputErrorRequire the client to have minimum API version- Parameters:
description- reason for the requirementmin- required minimum version- Throws:
InputError- if version is not met
-
apiVersionCheck
static void apiVersionCheck(java.lang.String description, int min, int currentVersion) throws InputErrorRequire the client to have minimum API version- Parameters:
description- reason for the requirementmin- required minimum versioncurrentVersion- current version- Throws:
InputError- if version is not met
-
-