Class GitHubConfiguration
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
org.jenkinsci.plugins.github_branch_source.GitHubConfiguration
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,Loadable
,OnMaster
-
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 TypeMethodDescriptionboolean
addEndpoint
(Endpoint endpoint) Adds an endpoint.boolean
configure
(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) findEndpoint
(String apiUri) Checks to see if the supplied server URL is defined in the global configuration.static GitHubConfiguration
get()
static String
normalizeApiUri
(String apiUri) Fix an apiUri.boolean
removeEndpoint
(String apiUri) Removes an endpoint.boolean
removeEndpoint
(Endpoint endpoint) Removes an endpoint.void
setApiRateLimitChecker
(ApiRateLimitChecker apiRateLimitChecker) void
setEndpoints
(List<Endpoint> endpoints) void
updateEndpoint
(Endpoint endpoint) Updates an existing endpoint (or adds if missing).Methods inherited from class jenkins.model.GlobalConfiguration
all, 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, getDisplayName, 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
-
Constructor Details
-
GitHubConfiguration
public GitHubConfiguration()
-
-
Method Details
-
get
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configure
in classGlobalConfiguration
- Throws:
Descriptor.FormException
-
getEndpoints
-
getApiRateLimitChecker
-
setApiRateLimitChecker
-
normalizeApiUri
Fix an apiUri.- Parameters:
apiUri
- the api URI.- Returns:
- the normalized api URI.
-
setEndpoints
-
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:
apiUri
- the API URI to remove.- Returns:
true
if the list of endpoints was modified
-
findEndpoint
Checks to see if the supplied server URL is defined in the global configuration.- Parameters:
apiUri
- the server url to check.- Returns:
- the global configuration for the specified server url or
null
if not defined.
-
doFillApiRateLimitCheckerItems
-
getRequiredGlobalConfigPagePermission
- Overrides:
getRequiredGlobalConfigPagePermission
in classDescriptor<GlobalConfiguration>
-