Class RemoteSource

  • All Implemented Interfaces:
    RepositorySource
    Direct Known Subclasses:
    SiteType

    public abstract class RemoteSource
    extends java.lang.Object
    implements RepositorySource
    A RepositorySource that was created by a RemoteListSourceProvider and superclass for xjc-generated classes used to parse the sites list xml. Generated classes provide the url and UI name; the permitted extensions must be set by the provider. If you implement a new site type, it should extend siteType in repo-sites-common-N.xsd, and thus transitively extend this class.
    • Constructor Detail

      • RemoteSource

        public RemoteSource()
    • Method Detail

      • setPermittedSchemaModules

        public void setPermittedSchemaModules​(@NonNull
                                              java.util.Collection<SchemaModule<?>> modules)
        Sets the list of modules allowed to be used when parsing XML fetched from this source.
      • getPermittedModules

        @NonNull
        public java.util.Collection<SchemaModule<?>> getPermittedModules()
        Description copied from interface: RepositorySource
        Gets the SchemaModules that are allowed to be used to parse XML from this source.
        Specified by:
        getPermittedModules in interface RepositorySource
        Returns:
        The list of schema modules allowed to be used when parsing XML fetched from this source.
      • isEnabled

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

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

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

        public void setUrl​(@NonNull
                           java.lang.String url)
      • 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.
      • getDisplayName

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

        @Nullable
        public java.lang.String getName()