Class BitbucketEndpointConfiguration
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
com.cloudbees.jenkins.plugins.bitbucket.endpoints.BitbucketEndpointConfiguration
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,Loadable
,OnMaster
Represents the global configuration of Bitbucket Cloud and Bitbucket Server endpoints.
- Since:
- 2.2.0
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addEndpoint
(BitbucketEndpoint endpoint) Adds an endpoint.boolean
configure
(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) get()
Gets theBitbucketEndpointConfiguration
singleton.Deprecated.Gets the list of endpoints.boolean
Returnstrue
if and only if there is more than one configured endpoint.static String
normalizeServerUrl
(String serverURL) Deprecated, for removal: This API element is subject to removal in a future version.Do not use at all, endpoint URL are already managed internallyreadResolveServerUrl
(String serverURL) Called from areadResolve()
method only to convert the oldbitbucketServerUrl
field into the newserverUrl
field.boolean
removeEndpoint
(BitbucketEndpoint endpoint) Removes an endpoint.boolean
removeEndpoint
(String serverURL) Removes an endpoint.void
setEndpoints
(List<? extends BitbucketEndpoint> endpoints) Sets the list of endpoints.void
updateEndpoint
(BitbucketEndpoint endpoint) Updates an existing endpoint (or adds if missing).Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPage
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
BitbucketEndpointConfiguration
public BitbucketEndpointConfiguration()Constructor.
-
-
Method Details
-
get
Gets theBitbucketEndpointConfiguration
singleton.- Returns:
- the
BitbucketEndpointConfiguration
singleton.
-
getRequiredGlobalConfigPagePermission
- Overrides:
getRequiredGlobalConfigPagePermission
in classDescriptor<GlobalConfiguration>
-
readResolveServerUrl
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @NonNull public String readResolveServerUrl(@CheckForNull String serverURL) Called from areadResolve()
method only to convert the oldbitbucketServerUrl
field into the newserverUrl
field. When called fromACL.SYSTEM
this will update the configuration with the missing definitions of resolved URLs.- Parameters:
serverURL
- the value of the old url field.- Returns:
- the value of the new url field.
-
isEndpointSelectable
public boolean isEndpointSelectable()Returnstrue
if and only if there is more than one configured endpoint.- Returns:
true
if and only if there is more than one configured endpoint.
-
getEndpointItems
Deprecated.UseBitbucketEndpointProvider.listEndpoints()
instead of this.Populates aListBoxModel
with the endpoints.- Returns:
- A
ListBoxModel
with all the endpoints
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configure
in classGlobalConfiguration
- Throws:
Descriptor.FormException
-
getEndpoints
Gets the list of endpoints.- Returns:
- the list of endpoints
-
setEndpoints
Sets the list of endpoints.- Parameters:
endpoints
- the list of endpoints.
-
addEndpoint
Adds an endpoint.- Parameters:
endpoint
- the endpoint to add.- Returns:
true
if the list of endpoints was modified
-
updateEndpoint
Updates an existing endpoint (or adds if missing).- Parameters:
endpoint
- the endpoint to update.
-
removeEndpoint
Removes an endpoint.- Parameters:
endpoint
- the endpoint to remove.- Returns:
true
if the list of endpoints was modified
-
removeEndpoint
Removes an endpoint.- Parameters:
serverURL
- the server URL to remove.- Returns:
true
if the list of endpoints was modified
-
getDefaultEndpoint
-
normalizeServerUrl
@CheckForNull @Deprecated(forRemoval=true) public static String normalizeServerUrl(@CheckForNull String serverURL) Deprecated, for removal: This API element is subject to removal in a future version.Do not use at all, endpoint URL are already managed internallyFix a serverUrl.- Parameters:
serverURL
- the server URL.- Returns:
- the normalized server URL.
-
BitbucketEndpointProvider.listEndpoints()
instead of this.