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
,OnMaster
@Extension public class GitHubConfiguration extends GlobalConfiguration
-
-
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 Constructor Description GitHubConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addEndpoint(Endpoint endpoint)
Adds an endpoint.boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
ListBoxModel
doFillApiRateLimitCheckerItems()
Endpoint
findEndpoint(String apiUri)
Checks to see if the supplied server URL is defined in the global configuration.static GitHubConfiguration
get()
ApiRateLimitChecker
getApiRateLimitChecker()
List<Endpoint>
getEndpoints()
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, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
get
public static GitHubConfiguration 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
-
getApiRateLimitChecker
@NonNull public ApiRateLimitChecker getApiRateLimitChecker()
-
setApiRateLimitChecker
public void setApiRateLimitChecker(@CheckForNull ApiRateLimitChecker apiRateLimitChecker)
-
normalizeApiUri
@CheckForNull public static String normalizeApiUri(@CheckForNull String apiUri)
Fix an apiUri.- Parameters:
apiUri
- the api URI.- Returns:
- the normalized api URI.
-
addEndpoint
public boolean addEndpoint(@NonNull Endpoint endpoint)
Adds an endpoint.- Parameters:
endpoint
- the endpoint to add.- Returns:
true
if the list of endpoints was modified
-
updateEndpoint
public void updateEndpoint(@NonNull Endpoint endpoint)
Updates an existing endpoint (or adds if missing).- Parameters:
endpoint
- the endpoint to update.
-
removeEndpoint
public boolean removeEndpoint(@NonNull Endpoint endpoint)
Removes an endpoint.- Parameters:
endpoint
- the endpoint to remove.- Returns:
true
if the list of endpoints was modified
-
removeEndpoint
public boolean removeEndpoint(@CheckForNull String apiUri)
Removes an endpoint.- Parameters:
apiUri
- the API URI to remove.- Returns:
true
if the list of endpoints was modified
-
findEndpoint
@CheckForNull public Endpoint findEndpoint(@CheckForNull String apiUri)
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
public ListBoxModel doFillApiRateLimitCheckerItems()
-
-