Package org.gitlab4j.api
Class ApplicationSettingsApi
java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.ApplicationSettingsApi
- All Implemented Interfaces:
Constants
This class implements the client side API for the GitLab Application Settings API.
See Application Settings API at GitLab for more information.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gitlab4j.api.Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.ContributorOrderBy, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.EventScope, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PackageOrderBy, Constants.PackageStatus, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
-
Field Summary
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
Fields inherited from interface org.gitlab4j.api.Constants
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the current application settings of the GitLab instance.static final ApplicationSettings
parseApplicationSettings
(com.fasterxml.jackson.databind.JsonNode root) Parses the returned JSON and returns an ApplicationSettings instance.updateApplicationSetting
(String setting, Object value) Update a single application setting of the GitLab instance with the provided settings and value.updateApplicationSetting
(Setting setting, Object value) Update a single application setting of the GitLab instance with the provided settings and value.updateApplicationSettings
(ApplicationSettings appSettings) Update the application settings of the GitLab instance with the settings in the provided ApplicationSettings instance.Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, upload, urlEncode, validate
-
Constructor Details
-
ApplicationSettingsApi
-
-
Method Details
-
getApplicationSettings
Get the current application settings of the GitLab instance.GitLab Endpoint: GET /api/v4/application/settings
- Returns:
- an ApplicationSettings instance containing the current application settings of the GitLab instance.
- Throws:
GitLabApiException
- if any exception occurs
-
updateApplicationSettings
public ApplicationSettings updateApplicationSettings(ApplicationSettings appSettings) throws GitLabApiException Update the application settings of the GitLab instance with the settings in the provided ApplicationSettings instance.GitLab Endpoint: PUT /api/v4/application/settings
- Parameters:
appSettings
- the ApplicationSettings instance holding the settings and values to update- Returns:
- the updated application settings in an ApplicationSettings instance
- Throws:
GitLabApiException
- if any exception occurs
-
updateApplicationSetting
public ApplicationSettings updateApplicationSetting(Setting setting, Object value) throws GitLabApiException Update a single application setting of the GitLab instance with the provided settings and value.GitLab Endpoint: PUT /api/v4/application/settings
- Parameters:
setting
- the ApplicationSetting to updatevalue
- the new value for the application setting- Returns:
- the updated application settings in an ApplicationSettings instance
- Throws:
GitLabApiException
- if any exception occurs
-
updateApplicationSetting
public ApplicationSettings updateApplicationSetting(String setting, Object value) throws GitLabApiException Update a single application setting of the GitLab instance with the provided settings and value.GitLab Endpoint: PUT /api/v4/application/settings
- Parameters:
setting
- the ApplicationSetting to updatevalue
- the new value for the application setting- Returns:
- the updated application settings in an ApplicationSettings instance
- Throws:
GitLabApiException
- if any exception occurs
-
parseApplicationSettings
public static final ApplicationSettings parseApplicationSettings(com.fasterxml.jackson.databind.JsonNode root) throws GitLabApiException Parses the returned JSON and returns an ApplicationSettings instance.- Parameters:
root
- the root JsonNode- Returns:
- the populated ApplicationSettings instance
- Throws:
GitLabApiException
- if any error occurs
-