Class GitLabServers
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
io.jenkins.plugins.gitlabserverconfig.servers.GitLabServers
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,PersistentDescriptor
,Saveable
,Loadable
,OnMaster
Represents the global configuration of GitLab servers.
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions()
Gets descriptor ofGitLabPersonalAccessTokenCreator
boolean
addServer
(GitLabServer server) Adds an server Checks if the GitLab Server name is uniquefindServer
(String serverName) Checks to see if the supplied server URL is defined in the global configuration.static GitLabServers
get()
Gets theGitLabServers
singleton.Populates aListBoxModel
with the servers.Gets the list of endpoints.static void
boolean
removeServer
(String name) Removes a server entry Checks if the GitLab Server name is matchedvoid
setServers
(List<? extends GitLabServer> servers) Sets the list of GitLab Serversboolean
updateServer
(GitLabServer server) Updates an existing endpoint (or adds if missing) Checks if the GitLab Server name is matchedMethods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPage
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.model.PersistentDescriptor
load
-
Field Details
-
LOGGER
-
-
Constructor Details
-
GitLabServers
public GitLabServers()
-
-
Method Details
-
getRequiredGlobalConfigPagePermission
- Overrides:
getRequiredGlobalConfigPagePermission
in classDescriptor<GlobalConfiguration>
-
get
Gets theGitLabServers
singleton.- Returns:
- the
GitLabServers
singleton.
-
getServerItems
Populates aListBoxModel
with the servers.- Returns:
- A
ListBoxModel
with all the servers
-
getServers
Gets the list of endpoints.- Returns:
- the list of endpoints
-
setServers
Sets the list of GitLab Servers- Parameters:
servers
- the list of endpoints.
-
getDisplayName
- Overrides:
getDisplayName
in classDescriptor<GlobalConfiguration>
-
actions
Gets descriptor ofGitLabPersonalAccessTokenCreator
- Returns:
- the list of descriptors
-
addServer
Adds an server Checks if the GitLab Server name is unique- Parameters:
server
- the server to add.- Returns:
true
if the list of endpoints was modified
-
updateServer
Updates an existing endpoint (or adds if missing) Checks if the GitLab Server name is matched- Parameters:
server
- the server to update.- Returns:
true
if the list of endpoints was modified
-
removeServer
Removes a server entry Checks if the GitLab Server name is matched- Parameters:
name
- the server name to remove.- Returns:
true
if the list of endpoints was modified
-
findServer
Checks to see if the supplied server URL is defined in the global configuration.- Parameters:
serverName
- the server url to check.- Returns:
- the global configuration for the specified server url or
null
if not defined.
-
migrateWebhookSecretsToCredentials
-