Class GitHubConfiguration

    • Constructor Detail

      • GitHubConfiguration

        public GitHubConfiguration()
    • Method Detail

      • getEndpoints

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