Class SimpleRepositorySource

    • Constructor Detail

      • SimpleRepositorySource

        public SimpleRepositorySource​(@NonNull
                                      java.lang.String url,
                                      @Nullable
                                      java.lang.String displayName,
                                      boolean enabled,
                                      @NonNull
                                      java.util.Collection<SchemaModule<?>> allowedModules,
                                      @NonNull
                                      RepositorySourceProvider provider)
        Constructor
        Parameters:
        url - The URL this source will fetch from.
        displayName - The user-friendly name for this source
        enabled - Whether this source is enabled.
        allowedModules - The SchemaModules allowed to be used when parsing the xml downloaded from this source.
        provider - The RepositorySourceProvider that created this source.
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface RepositorySource
        Returns:
        true if this source is enabled.
      • setEnabled

        public void setEnabled​(boolean enabled)
        Specified by:
        setEnabled in interface RepositorySource
        Parameters:
        enabled - Whether this source should be enabled or disabled.
      • getDisplayName

        @Nullable
        public java.lang.String getDisplayName()
        Specified by:
        getDisplayName in interface RepositorySource
        Returns:
        The user-friendly name for this source.
      • getUrl

        @NonNull
        public java.lang.String getUrl()
        Specified by:
        getUrl in interface RepositorySource
        Returns:
        The URL from which to download.
      • toString

        @NonNull
        public java.lang.String toString()
        Returns a debug string representation of this object. Not for user display.
        Overrides:
        toString in class java.lang.Object
      • setFetchError

        public void setFetchError​(@Nullable
                                  java.lang.String error)
        Description copied from interface: RepositorySource
        If an error was encountered loading from this source, it can be set here for display to the user.
        Specified by:
        setFetchError in interface RepositorySource
      • getFetchError

        @Nullable
        public java.lang.String getFetchError()
        Description copied from interface: RepositorySource
        Gets the error (if any) encountered when fetching content from this source.
        Specified by:
        getFetchError in interface RepositorySource
        Returns:
        The error, or null if the load was successful.