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
  • Constructor Details

    • GitHubConfiguration

      public GitHubConfiguration()
  • Method Details

    • 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 class GlobalConfiguration
      Throws:
      Descriptor.FormException
    • getEndpoints

      @NonNull public List<Endpoint> getEndpoints()
    • 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.
    • setEndpoints

      public void setEndpoints(@CheckForNull List<Endpoint> endpoints)
    • 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()
    • getRequiredGlobalConfigPagePermission

      @NonNull public Permission getRequiredGlobalConfigPagePermission()
      Overrides:
      getRequiredGlobalConfigPagePermission in class Descriptor<GlobalConfiguration>