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.SelfNested 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 TypeMethodDescriptionbooleanaddEndpoint(BitbucketEndpoint endpoint) Adds an endpoint.booleanconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) get()Gets theBitbucketEndpointConfigurationsingleton.Deprecated.Gets the list of endpoints.booleanReturnstrueif and only if there is more than one configured endpoint.static StringnormalizeServerUrl(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 oldbitbucketServerUrlfield into the newserverUrlfield.booleanremoveEndpoint(BitbucketEndpoint endpoint) Removes an endpoint.booleanremoveEndpoint(String serverURL) Removes an endpoint.voidsetEndpoints(List<? extends BitbucketEndpoint> endpoints) Sets the list of endpoints.voidupdateEndpoint(BitbucketEndpoint endpoint) Updates an existing endpoint (or adds if missing).Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPageMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, 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
-
getConfigFile
- Overrides:
getConfigFilein classDescriptor<GlobalConfiguration>
-
get
Gets theBitbucketEndpointConfigurationsingleton.- Returns:
- the
BitbucketEndpointConfigurationsingleton.
-
getRequiredGlobalConfigPagePermission
- Overrides:
getRequiredGlobalConfigPagePermissionin 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 oldbitbucketServerUrlfield into the newserverUrlfield. When called fromACL.SYSTEMthis 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()Returnstrueif and only if there is more than one configured endpoint.- Returns:
trueif and only if there is more than one configured endpoint.
-
getEndpointItems
Deprecated.UseBitbucketEndpointProvider.listEndpoints()instead of this.Populates aListBoxModelwith the endpoints.- Returns:
- A
ListBoxModelwith all the endpoints
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configurein 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:
trueif 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:
trueif the list of endpoints was modified
-
removeEndpoint
Removes an endpoint.- Parameters:
serverURL- the server URL to remove.- Returns:
trueif 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.